Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/PROVIDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ odek ships with built-in **model profiles** that automatically apply sensible de
| `deepseek-chat` | DeepSeek (legacy) | (provider default) | 120s | 128K | General |
| `deepseek-v4-flash` | DeepSeek v4 Flash | — (faster/cheaper) | 90s | 128K | Quick tasks, coding |
| `deepseek-v4-pro` | DeepSeek v4 Pro | `enabled` | 180s | **1M** | Deep reasoning |
| `kimi-…`, `k3…` (e.g. `kimi-for-coding`, `k3-256k`) | Kimi | (provider default) | 300s | 256K | Agentic coding |
| `kimi-…` (e.g. `kimi-for-coding`) | Kimi | (provider default) | 300s | 256K | Agentic coding |
| `k3` | Kimi | (provider default) | 300s | **1M** | Agentic coding |
| `k3-256k` | Kimi | (provider default) | 300s | 256K | Agentic coding |
| *(any other)* | Generic | (profile default) | 120s | (no limit) | Custom models |

### How profiles work
Expand Down
15 changes: 12 additions & 3 deletions odek.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,22 @@ var KnownProfiles = []struct {
},
},
{
// Kimi Code also ships models under the "k3" family name (k3, k3-256k),
// which the "kimi-" prefix does not match.
// Kimi Code also ships models under the "k3" family name, which the
// "kimi-" prefix does not match. Longest prefix wins: k3-256k is the
// 256K variant, bare k3 has a 1M context window.
Prefix: "k3-256k",
Profile: ModelProfile{
Label: "Kimi",
Timeout: 300,
MaxContext: 262_144, // 256K token context window
},
},
{
Prefix: "k3",
Profile: ModelProfile{
Label: "Kimi",
Timeout: 300,
MaxContext: 262_144,
MaxContext: 1_000_000, // 1M token context window
},
},
{
Expand Down
20 changes: 13 additions & 7 deletions odek_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,21 @@ func TestLookupProfile_KimiMatch(t *testing.T) {
t.Errorf("MaxContext = %d, want 262144", p.MaxContext)
}

// The k3 family (k3, k3-256k) is the same Kimi Code line under a
// different prefix — it must get the same profile.
for _, model := range []string{"k3", "k3-256k"} {
p := LookupProfile(model)
// The k3 family is the same Kimi Code line under a different prefix —
// longest prefix wins: k3-256k is the 256K variant, bare k3 is 1M.
for _, tc := range []struct {
model string
maxContext int
}{
{"k3", 1_000_000},
{"k3-256k", 262_144},
} {
p := LookupProfile(tc.model)
if p == nil {
t.Fatalf("LookupProfile(%q) returned nil", model)
t.Fatalf("LookupProfile(%q) returned nil", tc.model)
}
if p.Timeout != 300 || p.MaxContext != 262_144 {
t.Errorf("LookupProfile(%q) = %+v, want Timeout=300 MaxContext=262144", model, p)
if p.Timeout != 300 || p.MaxContext != tc.maxContext {
t.Errorf("LookupProfile(%q) = %+v, want Timeout=300 MaxContext=%d", tc.model, p, tc.maxContext)
}
}
}
Expand Down
Loading