Skip to content

Commit c0e2779

Browse files
authored
chore: sync main — MiniMax provider, DeepSeek dual-protocol, API compliance (#35)
* feat: full API compliance for all LLM providers Anthropic: all request fields, thinking+caching, count_tokens, org ID, 32MB limit OpenAI: tool_choice, top_p, stop, service_tier, user, penalties, logprobs, etc. Gemini: tool call IDs, safety settings, tool config, thinkingConfig, promptFeedback Vertex: full Anthropic parity, correct publisher path, typed struct, guardrails Features: zero hardcoded, catalog is single source of truth, no fallback Registry: display names from official docs, continuous numbering 1-16 * feat: add MiniMax provider with dual-protocol fallback - MiniMax Token Plan and Pay-as-you-go as separate providers - OpenAI-compatible primary + Anthropic-compatible fallback - Remove generic fallback keys for MiMo and MiniMax - Uniform naming: token plan first, then payg - 18 providers total * fix: add missing deepseek.go for NewDeepSeekClient * style: gofumpt + goimports formatting * fix: align tests with updated testdata fixtures and lint warnings
1 parent dce29ff commit c0e2779

45 files changed

Lines changed: 3252 additions & 542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

catalog/discover/merge.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,39 @@ func mergeCapabilities(existing, live catalog.CapabilitySetV1) catalog.Capabilit
166166
if live.ExplicitThinkingBudget != "" {
167167
existing.ExplicitThinkingBudget = live.ExplicitThinkingBudget
168168
}
169+
if live.AdaptiveThinking != "" {
170+
existing.AdaptiveThinking = live.AdaptiveThinking
171+
}
172+
if live.Effort != "" {
173+
existing.Effort = live.Effort
174+
}
175+
if live.StructuredOutput != "" {
176+
existing.StructuredOutput = live.StructuredOutput
177+
}
178+
if live.CodeExecution != "" {
179+
existing.CodeExecution = live.CodeExecution
180+
}
181+
if live.Citations != "" {
182+
existing.Citations = live.Citations
183+
}
184+
if live.PDFInput != "" {
185+
existing.PDFInput = live.PDFInput
186+
}
187+
if live.ImageInput != "" {
188+
existing.ImageInput = live.ImageInput
189+
}
190+
if live.MaxInputTokens > 0 {
191+
existing.MaxInputTokens = live.MaxInputTokens
192+
}
193+
if live.MaxOutputTokens > 0 {
194+
existing.MaxOutputTokens = live.MaxOutputTokens
195+
}
196+
if len(live.ThinkingTypes) > 0 {
197+
existing.ThinkingTypes = live.ThinkingTypes
198+
}
199+
if len(live.EffortLevels) > 0 {
200+
existing.EffortLevels = live.EffortLevels
201+
}
169202
return existing
170203
}
171204

catalog/live/anthropic_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func TestFetchAnthropic_MockHTTPServer(t *testing.T) {
3333
if err != nil {
3434
t.Fatal(err)
3535
}
36-
if len(entries) != 2 {
37-
t.Fatalf("expected 2 models, got %d", len(entries))
36+
if len(entries) != 17 {
37+
t.Fatalf("expected 17 models, got %d", len(entries))
3838
}
3939
byID := map[string]Entry{}
4040
for _, e := range entries {
@@ -44,11 +44,11 @@ func TestFetchAnthropic_MockHTTPServer(t *testing.T) {
4444
if !ok {
4545
t.Fatal("missing claude-sonnet-4-20250514")
4646
}
47-
if sonnet.DisplayName != "Claude Sonnet 4" {
47+
if sonnet.DisplayName != "Claude Sonnet 4 (deprecated)" {
4848
t.Fatalf("display name = %q", sonnet.DisplayName)
4949
}
50-
if sonnet.ContextWindow != 0 || sonnet.MaxOutput != 0 {
51-
t.Fatalf("context/max = %d/%d (expected 0/0 — no hardcoded defaults)", sonnet.ContextWindow, sonnet.MaxOutput)
50+
if sonnet.ContextWindow != 200000 || sonnet.MaxOutput != 64000 {
51+
t.Fatalf("context/max = %d/%d (expected 200000/64000)", sonnet.ContextWindow, sonnet.MaxOutput)
5252
}
5353
if len(sonnet.RawJSON) == 0 {
5454
t.Fatal("expected RawJSON to be preserved")

0 commit comments

Comments
 (0)