(content any)
| 1006 | ) (LLMClient, error) { |
| 1007 | base, err := NewLLMClientBase(apiKey, baseURL, model, maxTokens, thinkingBudgetTokens, retryConfig) |
| 1008 | if err != nil { |
| 1009 | return nil, err |
| 1010 | } |
| 1011 | |
| 1012 | selectedAPIType := "auto" |
| 1013 | if len(apiType) > 0 { |
| 1014 | selectedAPIType = apiType[0] |
| 1015 | } |
| 1016 | if useOpenAICompatible(model, selectedAPIType) { |
| 1017 | return &OpenAICompatibleClient{LLMClientBase: base}, nil |
| 1018 | } |
| 1019 | |
| 1020 | return &AnthropicClient{LLMClientBase: base}, nil |
| 1021 | } |
| 1022 | |
| 1023 | type Client struct { |
| 1024 | delegate LLMClient |
| 1025 | } |
| 1026 | |
| 1027 | func NewAPIClient( |
| 1028 | apiKey string, |
no outgoing calls
no test coverage detected