Repository navigation
fix: preserve incoming Anthropic beta headers - #32
Open
mkazlauskas wants to merge 1 commit into
Open
mkazlauskas wants to merge 1 commit into
mkazlauskas wants to merge 1 commit into
Conversation
mkazlauskas
marked this pull request as ready for review
September 24, 2026 06:58
Contributor
|
I also use rhis code locally in my fork, @dotCipher please consider to merge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve SDK-provided
anthropic-betaflags when rewriting OAuth requests, alongside the bridge defaults and required Claude Code/OAuth flags.Problem
buildBetaFlags(existing)currently ignoresexisting. This can leave beta-gated fields in the request body while removing the SDK header that enables them. The reported failure on OpenCode 1.18.31 with bridge 1.10.12 was:The patched OpenCode Anthropic SDK adds a thinking-binding-controls beta for this field. Preserving incoming flags avoids losing that capability declaration. This does not establish that every model or deployment supports the field.
Changes
The separate plugin startup failure (
modelId.match is not a function) is already fixed on upstream main by the{ id, server }default export, with existing regression coverage.Validation
npm test: 125 tests passed.npm run typecheck: passed.git diff --check: passed.