Repository navigation
fix(tui): load ANTHROPIC_API_KEY when populating Claude provider form - #228
Merged
SaladDay merged 1 commit intoJun 4, 2026
Merged
Conversation
thedavidweng
force-pushed
the
fix/anthropic-model-fetch-401
branch
from
June 2, 2026 01:15
b5b6bb5 to
504e4e5
Compare
Add regression coverage for loading Claude providers whose key is stored in ANTHROPIC_API_KEY, while preserving the current apiKeyField precedence rules. Refs SaladDay#227
SaladDay
force-pushed
the
fix/anthropic-model-fetch-401
branch
from
June 4, 2026 09:15
504e4e5 to
0334536
Compare
Owner
|
LGTM, THANKS |
SaladDay
approved these changes
Jun 4, 2026
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.
Closes #227
Problem
TUI fetch-models sends no auth when editing a Claude provider whose key is stored in
ANTHROPIC_API_KEY(common for configs imported from Claude Code).populate_claude_formonly readANTHROPIC_AUTH_TOKEN, leaving the form empty → HTTP 401.Model fetch HTTP logic (headers, URL ordering) already lives in
fetch_provider_models_for_tui(runtime_systems/types.rs); this PR does not change that path.Fix
Use
StreamCheckService::extract_claude_keywhen populating the Claude API key field, matching CLI and stream-check behavior.Tests
populate_claude_form_reads_anthropic_api_key_when_auth_token_missingpopulate_claude_form_prefers_anthropic_auth_token_over_api_keyVerification