Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): restore OpenCode Go limits for Console API keys #21007

MergedBenglennon123(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/21007/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 197 additions and 9 deletions.

x
0 of 3 viewed, 3 left
4 additions and 3 deletionsdocs/user/usage.mdModified
View file
@@ -113,9 +113,10 @@
​
OpenCode Go reports its session, weekly, and monthly allowance when OpenCode runs locally in
the environment. T3 cannot report limits for external OpenCode servers because their credentials
-belong to the remote server. Limits need an OpenCode Go API key. A Console sign-in alone
-does not report them. Add your Go API key as `OPENCODE_API_KEY` in the OpenCode instance's
-**Environment variables**, then refresh provider status. Cursor reports
+belong to the remote server. Limits need an OpenCode Go API key, or an OpenCode Console connected
+in OpenCode with an API key. A Console browser sign-in alone does not report them. You can also add
+your Go API key as `OPENCODE_API_KEY` in the OpenCode instance's **Environment variables**, then
+refresh provider status. Cursor reports
its monthly allowance, including separate Auto and API usage, using the CLI login or
`CURSOR_AUTH_TOKEN`. On macOS, this includes the default Keychain login after you enable Cursor
usage. Keychain login is used for limits only with Cursor's default API endpoint. If you configure
132 additions and 0 deletionspackages/provider-opencode/src/server/status.test.tsModified
View file
@@ -1,4 +1,5 @@
import * as NodeAssert from "node:assert/strict";
+import * as NodeSqlite from "node:sqlite";
​
import * as NodeServices from "@effect/platform-node/NodeServices";
import { it } from "@effect/vitest";
@@ -98,6 +99,137 @@
}),
​
+it.effect(
+ "uses the selected public Console key for Go limits, falling back only on auth rejection",