pub fn setup_primary_client(config: &AppConfig) -> Result<AiClient>Expand description
Sets up the primary AI client with credential resolution.
For the Anthropic provider, attempts to use Claude OAuth credentials in this order:
- Existing token in OS keyring
- ~/.claude/credentials.json file
- Environment variable (fallback)
For other providers, uses the standard environment variable path.
ยงErrors
Returns an error if client creation fails.