claw-code/rust/crates/rusty-claude-cli
TheArchitectit 14c0d9df40 fix: inject /setup provider settings as env var fallbacks for API client
The /setup wizard saves apiKey and baseUrl to ~/.claw/settings.json,
but the API client constructors (OpenAiCompatClient::from_env,
AnthropicClient::from_env) only read environment variables. This caused
saved provider settings to be silently ignored — you'd run /setup,
set a custom URL and API key, and the runtime would still try to use
the default endpoint.

Now AnthropicRuntimeClient::new() calls inject_config_as_env_fallbacks()
before constructing the API client. This function loads the config file's
provider settings and sets the corresponding env vars (OPENAI_API_KEY,
OPENAI_BASE_URL, etc.) only when they aren't already set — preserving
the 3-tier resolution order: env var > .env file > stored config.

This is a process-level env injection (set_var), so it only affects
the current claw process and its children, not the parent shell.
2026-06-15 13:47:28 -05:00
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix: inject /setup provider settings as env var fallbacks for API client 2026-06-15 13:47:28 -05:00
tests fix: /config help returns structured section list (#344) 2026-06-05 07:09:48 +09:00
Cargo.toml fix(tui): safe stdout capture + focused OpenCode-style layout 2026-06-12 14:17:21 -05:00
build.rs fix: expose complete version provenance 2026-06-04 15:55:08 +09:00