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
@@ -0,0 +1,27 @@
|
||||
package presets
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPresetsCarryCodexModelExtras(t *testing.T) {
|
||||
for _, p := range All {
|
||||
for _, name := range []string{"gpt-5-codex", "gpt-5", "codex-mini-latest"} {
|
||||
got, ok := p.Models.Extra[name]
|
||||
if !ok {
|
||||
t.Errorf("preset %q has no extra mapping for %q", p.Key, name)
|
||||
continue
|
||||
}
|
||||
if got != p.Models.Default {
|
||||
t.Errorf("preset %q maps %q to %q, want %q", p.Key, name, got, p.Models.Default)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestByKey(t *testing.T) {
|
||||
if _, ok := ByKey("deepseek"); !ok {
|
||||
t.Error("deepseek preset missing")
|
||||
}
|
||||
if _, ok := ByKey("nope"); ok {
|
||||
t.Error("unknown preset resolved")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user