mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-19 22:15:02 +00:00
feat(providers): add DashScope and Bailian Coding providers with reasoning_content support
- Add DashScope (Qwen) native provider with tools+streaming fallback - Add Bailian Coding provider with hardcoded model list (no /v1/models API) - Parse reasoning_content in OpenAI-compat streaming/non-streaming responses - Emit ChatEventThinking events in agent loop for thinking models - Add vision support for DashScope (qwen3-vl) - Fix provider form dialog not updating API base URL when switching types - Update README provider count from 11+ to 13+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
2041b7037b
commit
d913f29c69
15 files changed
+157
-13
No files matched your search
@@ -66,6 +66,20 @@ func registerProviders(registry *providers.Registry, cfg *config.Config) {
|
||||
registry.Register(providers.NewOpenAIProvider("perplexity", cfg.Providers.Perplexity.APIKey, "https://api.perplexity.ai", "sonar-pro"))
|
||||
slog.Info("registered provider", "name", "perplexity")
|
||||
}
|
||||
|
||||
if cfg.Providers.DashScope.APIKey != "" {
|
||||
registry.Register(providers.NewDashScopeProvider(cfg.Providers.DashScope.APIKey, cfg.Providers.DashScope.APIBase, "qwen3-max"))
|
||||
slog.Info("registered provider", "name", "dashscope")
|
||||
}
|
||||
|
||||
if cfg.Providers.Bailian.APIKey != "" {
|
||||
base := cfg.Providers.Bailian.APIBase
|
||||
if base == "" {
|
||||
base = "https://coding-intl.dashscope.aliyuncs.com/v1"
|
||||
}
|
||||
registry.Register(providers.NewOpenAIProvider("bailian", cfg.Providers.Bailian.APIKey, base, "qwen3.5-plus"))
|
||||
slog.Info("registered provider", "name", "bailian")
|
||||
}
|
||||
}
|
||||
|
||||
// registerProvidersFromDB loads providers from Postgres and registers them.
|
||||
@@ -84,6 +98,14 @@ func registerProvidersFromDB(registry *providers.Registry, provStore store.Provi
|
||||
if p.ProviderType == store.ProviderAnthropicNative {
|
||||
registry.Register(providers.NewAnthropicProvider(p.APIKey,
|
||||
providers.WithAnthropicBaseURL(p.APIBase)))
|
||||
} else if p.ProviderType == store.ProviderDashScope {
|
||||
registry.Register(providers.NewDashScopeProvider(p.APIKey, p.APIBase, ""))
|
||||
} else if p.ProviderType == store.ProviderBailian {
|
||||
base := p.APIBase
|
||||
if base == "" {
|
||||
base = "https://coding-intl.dashscope.aliyuncs.com/v1"
|
||||
}
|
||||
registry.Register(providers.NewOpenAIProvider(p.Name, p.APIKey, base, "qwen3.5-plus"))
|
||||
} else {
|
||||
prov := providers.NewOpenAIProvider(p.Name, p.APIKey, p.APIBase, "")
|
||||
if p.ProviderType == store.ProviderMiniMax {
|
||||
|
||||
Reference in new issue
Block a user