refactor(providers): restructure provider creation with protocol-based configuration

- Move provider creation logic to factory_provider.go with protocol-based approach
- Add OpenAIProviderConfig with WebSearch support and embedded ProviderConfig
- Add maxTokensField to OpenAI-compatible provider for configurable token field
- Introduce new providers: Ollama, DeepSeek, GitHubCopilot, Antigravity, Qwen
- Remove redundant CreateProvider function from factory.go
- Add ThoughtSignature field to FunctionCall for tool response handling
- Remove duplicate Name field assignment in tool loop
- Update tests to reflect new provider configuration structure
This commit is contained in:
yinwm
2026-02-20 00:12:01 +08:00
parent f8f1d539d4
commit 68cdafc5f2
10 changed files with 115 additions and 156 deletions
+3 -2
View File
@@ -9,8 +9,9 @@ type ToolCall struct {
}
type FunctionCall struct {
Name string `json:"name"`
Arguments string `json:"arguments"`
Name string `json:"name"`
Arguments string `json:"arguments"`
ThoughtSignature string `json:"thought_signature,omitempty"`
}
type LLMResponse struct {