fix: inject anthropic service_tier for OAuth auth#55922
fix: inject anthropic service_tier for OAuth auth#55922vincentkoc merged 4 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR removes the OAuth token ( Confidence Score: 5/5This PR is safe to merge — the change is minimal, correct, and well-covered by updated tests. One line removed from an early-return guard; the fix aligns OAuth token behavior with regular API key behavior and is backed by two targeted regression tests. No P0/P1 issues found. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts | Removes the OAuth token exclusion from the service_tier injection guard — one-line fix, correct and minimal. |
| src/agents/pi-embedded-runner-extraparams.test.ts | Flips existing OAuth test assertion and adds a regression test for fastMode: false → standard_only. |
Reviews (1): Last reviewed commit: "fix: inject anthropic service_tier for O..." | Re-trigger Greptile
|
@vincentkoc — OAuth tokens now receive service_tier injection, matching Claude Code CLI behavior. Reduces avoidable 529 cascades during high API load. 2 files, +22/-4. Fixes #55758. |
This comment was marked as spam.
This comment was marked as spam.
Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758
64c6c9c to
9b5ca5c
Compare
This comment was marked as spam.
This comment was marked as spam.
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix: inject anthropic service_tier for OAuth auth Remove the OAuth-token exclusion from createAnthropicFastModeWrapper so that sk-ant-oat-* requests receive service_tier injection, matching Claude Code CLI behavior and reducing avoidable 529 overload cascades. isAnthropicOAuthApiKey remains in use in createAnthropicBetaHeadersWrapper for beta header selection — it is not dead code after this change. Fixes openclaw#55758 * docs(changelog): note anthropic oauth service tier fix * Update CHANGELOG.md --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
No description provided.