Conversation
There was a problem hiding this comment.
Pull request overview
Adds Aliyun Bailian/DashScope as a configurable LLM provider option and updates docs/examples to reflect the new provider.
Changes:
- Add
providers.bailianconfig block and wire it intoCreateProviderwith a DashScope-compatible default API base. - Fix Telegram channel to use the canonical
senderID(including username when present) when dispatching messages. - Update README(s) and config example JSON to mention Bailian/DashScope.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/providers/http_provider.go | Adds provider selection for Bailian/DashScope/Aliyun with a default compatible-mode API base. |
| pkg/config/config.go | Adds Bailian provider config entry; small comment/style tweaks; uses 0o file mode literals when saving config. |
| pkg/channels/telegram.go | Uses senderID consistently when calling HandleMessage. |
| config/config.example.json | Adds example providers.bailian block. |
| README.md | Mentions Bailian and adds it to provider table. |
| README.zh.md | Mentions 百炼 / DashScope in provider list. |
| README.ja.md | Mentions Bailian / DashScope in provider list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| case "bailian", "dashscope", "aliyun": | ||
| if cfg.Providers.Bailian.APIKey != "" { | ||
| apiKey = cfg.Providers.Bailian.APIKey | ||
| apiBase = cfg.Providers.Bailian.APIBase | ||
| if apiBase == "" { |
There was a problem hiding this comment.
Bailian is only selectable when agents.defaults.provider is explicitly set to bailian/dashscope/aliyun. The model-based fallback below doesn’t recognize Bailian/DashScope models (e.g., qwen-*), so users who only set providers.bailian.api_key will still fall through to OpenRouter or error. Consider adding a fallback branch that selects Bailian when the model indicates Qwen/DashScope (or when the model has a bailian/ or dashscope/ prefix), using the same default API base.
| Proxy string `json:"proxy,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_PROXY"` | ||
| AuthMethod string `json:"auth_method,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_AUTH_METHOD"` | ||
| ConnectMode string `json:"connect_mode,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_CONNECT_MODE"` //only for Github Copilot, `stdio` or `grpc` | ||
| ConnectMode string `json:"connect_mode,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_CONNECT_MODE"` // only for Github Copilot, `stdio` or `grpc` |
There was a problem hiding this comment.
Comment uses “Github”; project naming elsewhere uses “GitHub”. Please update the comment to avoid inconsistent capitalization (and to match the provider key github_copilot).
| ConnectMode string `json:"connect_mode,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_CONNECT_MODE"` // only for Github Copilot, `stdio` or `grpc` | |
| ConnectMode string `json:"connect_mode,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_CONNECT_MODE"` // only for GitHub Copilot, `stdio` or `grpc` |
📝 Description
🗣️ Type of Change
🤖 AI Code Generation
🔗 Linked Issue
📚 Technical Context (Skip for Docs)
🧪 Test Environment & Hardware
📸 Proof of Work (Optional for Docs)
☑️ Checklist