Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(opencode): read usage from Console OAuth logins #33287

Closedgoncalompontes(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/33287/headopened View on GitHub

Showing 3 changed files with 91 additions and 34 deletions.

x
0 of 3 viewed, 3 left
2 additions and 1 deletionpackages/provider-opencode/src/server/driver.test.tsModified
View file
@@ -74,7 +74,8 @@
OpenCodeDriver.create({
instanceId: ProviderInstanceId.make("opencode-test"),
displayName: undefined,
- environment: [],
+ // Keep the usage probe off this host's real OpenCode credential store.
+ environment: [{ name: "OPENCODE_AUTH_CONTENT", value: "{}", sensitive: false }],
enabled: true,
config: { ...OpenCodeDriver.defaultConfig(), ...config },
}).pipe(Effect.provideService(HttpClient.HttpClient, http));
29 additions and 8 deletionspackages/provider-opencode/src/server/status.test.tsModified
View file
@@ -98,7 +98,7 @@
);
​
it.effect(
- "uses the selected public Console key for Go limits, falling back only on auth rejection",
+ "uses the selected public Console credential for Go limits, falling back only on auth rejection",
() =>
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
@@ -117,9 +117,15 @@
const insert = database.prepare("INSERT INTO credential VALUES (?, ?, ?, ?, ?, ?)");
const window = { percent: 1, resetsAt: "2026-09-17T12:00:00.000Z" };
- const consoleKey = { type: "key", key: "console-key" };
+ const consoleKey = {