Skip to content
Open
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ The proxy accepts full model IDs and these short aliases:
| `qwen-3.6-plus`, `qwen3.6-plus`, `qwen3.6` | `Qwen/Qwen3.6-Plus` |
| `step-3.5-flash`, `step3.5` | `stepfun/Step-3.5-Flash` |
| `gemini-3.1-flash-lite`, `gemini-flash-lite` | `google/gemini-3.1-flash-lite` |
| `minimax-m3`, `minimax3` | `MiniMaxAI/MiniMax-M3` |
| `qwen-3.7-max-free`, `qwen3.7-max-free` | `Qwen/Qwen3.7-Max-Free` |
| `qwen-3.7-max`, `qwen3.7-max` | `Qwen/Qwen3.7-Max` |
| `step-3.7-flash`, `step3.7` | `stepfun/Step-3.7-Flash` |
| `mimo-v2.5-pro`, `mimo-pro` | `xiaomi/mimo-v2.5-pro` |
| `mimo-v2.5`, `mimo` | `xiaomi/mimo-v2.5` |

Unknown model names are passed through unchanged.

Expand Down
12 changes: 12 additions & 0 deletions internal/proxy/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ func MapModel(name string) string {
return "MiniMaxAI/MiniMax-M2.7"
case "minimax-m2.5", "minimax2.5", "minimax":
return "MiniMaxAI/MiniMax-M2.5"
case "MiniMaxAI/MiniMax-M3", "minimax-m3", "minimax3":
return "MiniMaxAI/MiniMax-M3"
case "glm-5.1":
return "zai-org/GLM-5.1"
case "glm-5":
Expand All @@ -27,8 +29,18 @@ func MapModel(name string) string {
return "Qwen/Qwen3.6-Plus"
case "step-3.5-flash", "step3.5":
return "stepfun/Step-3.5-Flash"
case "step-3.7-flash", "step3.7", "stepfun/Step-3.7-Flash":
return "stepfun/Step-3.7-Flash"
case "gemini-3.1-flash-lite", "gemini-flash-lite":
return "google/gemini-3.1-flash-lite"
case "qwen-3.7-max-free", "qwen3.7-max-free", "Qwen/Qwen3.7-Max-Free":
return "Qwen/Qwen3.7-Max-Free"
case "qwen-3.7-max", "qwen3.7-max", "Qwen/Qwen3.7-Max":
return "Qwen/Qwen3.7-Max"
case "mimo-v2.5-pro", "mimo-pro", "xiaomi/mimo-v2.5-pro":
return "xiaomi/mimo-v2.5-pro"
case "mimo-v2.5", "mimo", "xiaomi/mimo-v2.5":
return "xiaomi/mimo-v2.5"
default:
return name // pass through as-is
}
Expand Down
60 changes: 60 additions & 0 deletions internal/proxy/model_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package proxy

import "testing"

func TestMapModel(t *testing.T) {
cases := []struct {
in, want string
}{
// Existing short aliases
{"deepseek-v4-pro", "deepseek/deepseek-v4-pro"},
{"deepseek-v4", "deepseek/deepseek-v4-pro"},
{"DEEPSEEK-PRO", "deepseek/deepseek-v4-pro"},
{"deepseek-v4-flash", "deepseek/deepseek-v4-flash"},
{"deepseek-flash", "deepseek/deepseek-v4-flash"},
{"minimax-m2.7", "MiniMaxAI/MiniMax-M2.7"},
{"minimax-m2.5", "MiniMaxAI/MiniMax-M2.5"},
{"minimax", "MiniMaxAI/MiniMax-M2.5"},
{"glm-5.1", "zai-org/GLM-5.1"},
{"glm-5", "zai-org/GLM-5"},
{"kimi-k2.6", "moonshotai/Kimi-K2.6"},
{"kimi-k2.5", "moonshotai/Kimi-K2.5"},
{"qwen-3.6-max-preview", "Qwen/Qwen3.6-Max-Preview"},
{"qwen3.6", "Qwen/Qwen3.6-Plus"},
{"step-3.5-flash", "stepfun/Step-3.5-Flash"},
{"gemini-3.1-flash-lite", "google/gemini-3.1-flash-lite"},

// New short aliases
{"minimax-m3", "MiniMaxAI/MiniMax-M3"},
{"minimax3", "MiniMaxAI/MiniMax-M3"},
{"qwen-3.7-max-free", "Qwen/Qwen3.7-Max-Free"},
{"qwen3.7-max-free", "Qwen/Qwen3.7-Max-Free"},
{"qwen-3.7-max", "Qwen/Qwen3.7-Max"},
{"qwen3.7-max", "Qwen/Qwen3.7-Max"},
{"step-3.7-flash", "stepfun/Step-3.7-Flash"},
{"step3.7", "stepfun/Step-3.7-Flash"},
{"mimo-v2.5-pro", "xiaomi/mimo-v2.5-pro"},
{"mimo-pro", "xiaomi/mimo-v2.5-pro"},
{"mimo-v2.5", "xiaomi/mimo-v2.5"},
{"mimo", "xiaomi/mimo-v2.5"},

// New full IDs pass through
{"MiniMaxAI/MiniMax-M3", "MiniMaxAI/MiniMax-M3"},
{"Qwen/Qwen3.7-Max-Free", "Qwen/Qwen3.7-Max-Free"},
{"Qwen/Qwen3.7-Max", "Qwen/Qwen3.7-Max"},
{"stepfun/Step-3.7-Flash", "stepfun/Step-3.7-Flash"},
{"xiaomi/mimo-v2.5-pro", "xiaomi/mimo-v2.5-pro"},
{"xiaomi/mimo-v2.5", "xiaomi/mimo-v2.5"},

// Unknown names pass through unchanged
{"some/unknown-model", "some/unknown-model"},
{"claude-sonnet-4-6", "claude-sonnet-4-6"},
{"", ""},
}
for _, c := range cases {
got := MapModel(c.in)
if got != c.want {
t.Errorf("MapModel(%q) = %q, want %q", c.in, got, c.want)
}
}
}
8 changes: 8 additions & 0 deletions internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ func (p *Proxy) HandleModels(w http.ResponseWriter, r *http.Request) {
// MiniMaxAI
{ID: "MiniMaxAI/MiniMax-M2.7", Object: "model", Created: 0, OwnedBy: "minimaxai"},
{ID: "MiniMaxAI/MiniMax-M2.5", Object: "model", Created: 0, OwnedBy: "minimaxai"},
{ID: "MiniMaxAI/MiniMax-M3", Object: "model", Created: 0, OwnedBy: "minimaxai"},
// DeepSeek
{ID: "deepseek/deepseek-v4-pro", Object: "model", Created: 0, OwnedBy: "deepseek"},
{ID: "deepseek/deepseek-v4-flash", Object: "model", Created: 0, OwnedBy: "deepseek"},
Expand All @@ -688,6 +689,13 @@ func (p *Proxy) HandleModels(w http.ResponseWriter, r *http.Request) {
{ID: "Qwen/Qwen3.6-Plus", Object: "model", Created: 0, OwnedBy: "qwen"},
// StepFun
{ID: "stepfun/Step-3.5-Flash", Object: "model", Created: 0, OwnedBy: "stepfun"},
{ID: "stepfun/Step-3.7-Flash", Object: "model", Created: 0, OwnedBy: "stepfun"},
// Qwen (3.7 line)
{ID: "Qwen/Qwen3.7-Max-Free", Object: "model", Created: 0, OwnedBy: "qwen"},
{ID: "Qwen/Qwen3.7-Max", Object: "model", Created: 0, OwnedBy: "qwen"},
// Xiaomi MiMo
{ID: "xiaomi/mimo-v2.5-pro", Object: "model", Created: 0, OwnedBy: "xiaomi"},
{ID: "xiaomi/mimo-v2.5", Object: "model", Created: 0, OwnedBy: "xiaomi"},
// Google
{ID: "google/gemini-3.1-flash-lite", Object: "model", Created: 0, OwnedBy: "google"},
},
Expand Down