opencode-anthropic-fix 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.mjs +6 -4
- package/lib/rotation.test.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ The [original plugin](https://github.com/anomalyco/opencode-anthropic-auth) prov
|
|
|
46
46
|
- **OAuth endpoint fingerprint parity** — matches the real CLI's bundled axios 1.13.6 HTTP client signature (`Accept`, `User-Agent`, `Content-Type`) on all OAuth token endpoint calls, required since 2026-03-21 server-side enforcement
|
|
47
47
|
- **Dynamic billing cache hash** — computes the `cch` field in the billing header using the real CLI's `NP1()` algorithm (SHA-256 of salt + first user message chars + version), replacing the static `00000` placeholder
|
|
48
48
|
- **Adaptive thinking for Opus/Sonnet 4.6** — automatically normalizes thinking to `{type: "adaptive"}` for supported models, with `effort-2025-11-24` beta
|
|
49
|
-
- **Upstream-aligned auto betas** — 13+ always-on betas matching Claude Code 2.1.
|
|
49
|
+
- **Upstream-aligned auto betas** — 13+ always-on betas matching Claude Code 2.1.92 (`redact-thinking-2026-02-12` available as opt-in to preserve thinking block visibility)
|
|
50
50
|
- **1M context limit override** — patches `model.limit.context` so OpenCode compacts at the right threshold while `models.dev` catches up
|
|
51
51
|
- **Runtime config + custom betas** — `/anthropic set`, `/anthropic config`, and `/anthropic betas` slash commands for live feature toggling without restarting OpenCode
|
|
52
52
|
- **Files API integration** — upload, list, download, and manage files via `/anthropic files` with endpoint/content-scoped `files-api-2025-04-14` beta injection
|
package/index.mjs
CHANGED
|
@@ -4886,17 +4886,19 @@ process.once("beforeExit", _beforeExitHandler);
|
|
|
4886
4886
|
// Request building helpers (extracted from original fetch interceptor)
|
|
4887
4887
|
// ---------------------------------------------------------------------------
|
|
4888
4888
|
|
|
4889
|
-
const FALLBACK_CLAUDE_CLI_VERSION = "2.1.
|
|
4889
|
+
const FALLBACK_CLAUDE_CLI_VERSION = "2.1.92";
|
|
4890
4890
|
const CLAUDE_CODE_NPM_LATEST_URL = "https://registry.npmjs.org/@anthropic-ai/claude-code/latest";
|
|
4891
|
-
const CLAUDE_CODE_BUILD_TIME = "2026-04-
|
|
4891
|
+
const CLAUDE_CODE_BUILD_TIME = "2026-04-03T23:25:15Z";
|
|
4892
4892
|
|
|
4893
|
-
// The @anthropic-ai/sdk version bundled with Claude Code v2.1.
|
|
4893
|
+
// The @anthropic-ai/sdk version bundled with Claude Code v2.1.92.
|
|
4894
4894
|
// This is distinct from the CLI version and goes in X-Stainless-Package-Version.
|
|
4895
|
-
// Verified by extracting VERSION="0.208.0" from the bundled cli.js of all versions .80-.
|
|
4895
|
+
// Verified by extracting VERSION="0.208.0" from the bundled cli.js of all versions .80-.92.
|
|
4896
4896
|
const ANTHROPIC_SDK_VERSION = "0.208.0";
|
|
4897
4897
|
|
|
4898
4898
|
// Map of CLI version → bundled SDK version (update when CLI version changes)
|
|
4899
4899
|
const CLI_TO_SDK_VERSION = new Map([
|
|
4900
|
+
["2.1.92", "0.208.0"],
|
|
4901
|
+
["2.1.91", "0.208.0"],
|
|
4900
4902
|
["2.1.90", "0.208.0"],
|
|
4901
4903
|
["2.1.89", "0.208.0"],
|
|
4902
4904
|
["2.1.88", "0.208.0"],
|
package/lib/rotation.test.mjs
CHANGED
|
@@ -119,7 +119,7 @@ describe("TokenBucketTracker", () => {
|
|
|
119
119
|
|
|
120
120
|
it("consume reduces tokens", () => {
|
|
121
121
|
tracker.consume(0);
|
|
122
|
-
expect(tracker.getTokens(0)).
|
|
122
|
+
expect(tracker.getTokens(0)).toBeCloseTo(49, 1);
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
it("consume returns false when insufficient tokens", () => {
|