fix: preflight Anthropic auth and prefer Claude store

This commit is contained in:
teknium1 2026-03-14 19:38:55 -07:00
parent e052c74727
commit 70ea13eb40
6 changed files with 135 additions and 8 deletions

View file

@ -1092,6 +1092,13 @@ def save_anthropic_oauth_token(value: str, save_fn=None):
writer("ANTHROPIC_API_KEY", "")
def use_anthropic_claude_code_credentials(save_fn=None):
"""Use Claude Code's own credential files instead of persisting env tokens."""
writer = save_fn or save_env_value
writer("ANTHROPIC_TOKEN", "")
writer("ANTHROPIC_API_KEY", "")
def save_anthropic_api_key(value: str, save_fn=None):
"""Persist an Anthropic API key and clear the OAuth/setup-token slot."""
writer = save_fn or save_env_value