Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

OpenFushi500(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/27166/headopened View on GitHub

Showing 3 changed files with 42 additions and 8 deletions (loading 1).

x
0 of 3 viewed, 3 left
2 additions and 1 deletionpackages/provider-opencode/src/server/driver.test.tsModified
View file
@@ -92,7 +92,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,
config: { ...OpenCodeDriver.defaultConfig(), ...config },
}).pipe(Effect.provideService(HttpClient.HttpClient, http));
40 additions and 7 deletionspackages/provider-opencode/src/server/status.test.tsModified
View file
@@ -101,7 +101,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;
@@ -120,9 +120,18 @@
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 = {