mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
docs(test): document protocol architecture and migration compatibility
This commit is contained in:
@@ -662,6 +662,16 @@ The subagent has access to tools (message, web_search, etc.) and can communicate
|
||||
| `deepseek(To be tested)` | LLM (DeepSeek direct) | [platform.deepseek.com](https://platform.deepseek.com) |
|
||||
| `groq` | LLM + **Voice transcription** (Whisper) | [console.groq.com](https://console.groq.com) |
|
||||
|
||||
### Provider Architecture
|
||||
|
||||
PicoClaw routes providers by protocol family:
|
||||
|
||||
- OpenAI-compatible protocol: OpenRouter, OpenAI-compatible gateways, Groq, Zhipu, and vLLM-style endpoints.
|
||||
- Anthropic protocol: Claude-native API behavior.
|
||||
- Codex/OAuth path: OpenAI OAuth/token authentication route.
|
||||
|
||||
This keeps the runtime lightweight while making new OpenAI-compatible backends mostly a config operation (`api_base` + `api_key`).
|
||||
|
||||
<details>
|
||||
<summary><b>Zhipu</b></summary>
|
||||
|
||||
|
||||
@@ -299,6 +299,24 @@ func TestConvertConfig(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestSupportedProvidersCompatibility(t *testing.T) {
|
||||
expected := []string{
|
||||
"anthropic",
|
||||
"openai",
|
||||
"openrouter",
|
||||
"groq",
|
||||
"zhipu",
|
||||
"vllm",
|
||||
"gemini",
|
||||
}
|
||||
|
||||
for _, provider := range expected {
|
||||
if !supportedProviders[provider] {
|
||||
t.Fatalf("supportedProviders missing expected key %q", provider)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestMergeConfig(t *testing.T) {
|
||||
t.Run("fills empty fields", func(t *testing.T) {
|
||||
existing := config.DefaultConfig()
|
||||
|
||||
Reference in New Issue
Block a user