mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-03 22:48:49 +03:00
feat: provider tests + grok integration
This commit is contained in:
@@ -36,11 +36,10 @@ impl ProviderClient {
|
||||
) -> Result<Self, ApiError> {
|
||||
let resolved_model = providers::resolve_model_alias(model);
|
||||
match providers::detect_provider_kind(&resolved_model) {
|
||||
ProviderKind::Anthropic => Ok(Self::Anthropic(
|
||||
anthropic_auth
|
||||
.map(AnthropicClient::from_auth)
|
||||
.unwrap_or(AnthropicClient::from_env()?),
|
||||
)),
|
||||
ProviderKind::Anthropic => Ok(Self::Anthropic(match anthropic_auth {
|
||||
Some(auth) => AnthropicClient::from_auth(auth),
|
||||
None => AnthropicClient::from_env()?,
|
||||
})),
|
||||
ProviderKind::Xai => Ok(Self::Xai(OpenAiCompatClient::from_env(
|
||||
OpenAiCompatConfig::xai(),
|
||||
)?)),
|
||||
|
||||
Reference in New Issue
Block a user