Archived
CrossRelay stage 2: Codex /v1/responses relay, config.toml manager, Codex page
This commit is contained in:
1 parent
404704171d
commit
5112f7ca06
30 files changed
+3539
-72
No files matched your search
@@ -21,6 +21,7 @@ var All = []Preset{
|
||||
Sonnet: "deepseek-chat",
|
||||
Haiku: "deepseek-chat",
|
||||
Opus: "deepseek-chat",
|
||||
Extra: codexModelExtras("deepseek-chat"),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -31,6 +32,7 @@ var All = []Preset{
|
||||
Sonnet: "kimi-k2-0905-preview",
|
||||
Haiku: "kimi-k2-0905-preview",
|
||||
Opus: "kimi-k2-0905-preview",
|
||||
Extra: codexModelExtras("kimi-k2-0905-preview"),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -41,10 +43,22 @@ var All = []Preset{
|
||||
Sonnet: "glm-4.6",
|
||||
Haiku: "glm-4.6",
|
||||
Opus: "glm-4.6",
|
||||
Extra: codexModelExtras("glm-4.6"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// codexModelExtras maps the model names Codex CLI asks for onto one
|
||||
// upstream model, so activating a preset for Codex works without manual
|
||||
// mapping.
|
||||
func codexModelExtras(upstream string) map[string]string {
|
||||
return map[string]string{
|
||||
"gpt-5-codex": upstream,
|
||||
"gpt-5": upstream,
|
||||
"codex-mini-latest": upstream,
|
||||
}
|
||||
}
|
||||
|
||||
// ByKey looks up a preset by its key.
|
||||
func ByKey(key string) (Preset, bool) {
|
||||
for _, p := range All {
|
||||
|
||||
Reference in new issue
Block a user