fix(#7029): scrub ANTHROPIC_OAUTH_TOKEN for the anthropic-vertex provider - #7033
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#7029): scrub ANTHROPIC_OAUTH_TOKEN for the anthropic-vertex provider#7033fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
…ider pi's built-in anthropic provider resolves three credential names from the environment: ANTHROPIC_AUTH_TOKEN, ANTHROPIC_OAUTH_TOKEN and ANTHROPIC_API_KEY. The anthropic-vertex credential scrub in buildPiRunCommand (pi_run.go) and childEnv (fullsend-agent.js) only cleared two of the three, leaving ANTHROPIC_OAUTH_TOKEN unscrubbed. A .env or repository variable that sets it would authenticate pi's built-in anthropic provider on a run that was supposed to be Vertex-only, for both the parent and every sub-agent. Add ANTHROPIC_OAUTH_TOKEN to the unset string in pi_run.go and the delete block in fullsend-agent.js. Update the test assertions in pi_run_test.go and fullsend-agent.test.mjs to cover all three credential names. Remove the known-gap note from runtime-implementation.md. Note: pre-commit hooks were not run in-sandbox. pre-commit could not complete (infrastructure failure: remote hook repos unreachable in sandbox). Direct execution of local hooks (gofmt, go vet) passed. Closes #7029
|
🤖 Finished Review · ✅ Success · Started 11:05 PM UTC · Completed 11:16 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.66 |
Site previewPreview: https://63915fdb-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me |
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
Add
ANTHROPIC_OAUTH_TOKENto the credential scrub list for theanthropic-vertexprovider in both the parent run command (pi_run.go) and sub-agent dispatch (fullsend-agent.js), closing a gap where pi's built-inanthropicprovider could authenticate via the third credential name it resolves from the environment.Related Issue
Fixes #7029
Changes
ANTHROPIC_OAUTH_TOKENto theunsetstring inbuildPiRunCommand(internal/runtime/pi_run.go)delete env.ANTHROPIC_OAUTH_TOKENtochildEnvininternal/runtime/pi_extension/fullsend-agent.jspi_run_test.go(2 places) andfullsend-agent.test.mjsto cover all three credential names pi's built-in anthropic provider resolvesdocs/contributing/runtime-implementation.mdto remove the known-gap note and document the complete scrub listTesting
internal/runtime/pass (go test ./internal/runtime/ -count=1)fullsend-agent.test.mjspass (32/32, 1 skipped for missing pi binary)go vet ./internal/runtime/...passesgofmtcleanChecklist
!for breaking changes)Closes #7029
Post-script verification
agent/7029-scrub-anthropic-oauth-token)5d199943b4df75d067967aaf474d5422e9ad3939..HEAD)