mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-28 03:07:08 +08:00
style(codex): use tagged switch for capability conflict fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c0e5a4670e
commit
dd7ee21703
1 file changed
+3
-2
@@ -283,9 +283,10 @@ func intersectUpstreamModelMetadata(modelID string, candidates []UpstreamModelMe
|
||||
result.CodexToolCapabilities[field] = value
|
||||
} else if declared {
|
||||
fallback := json.RawMessage("null")
|
||||
if field == "supports_search_tool" || field == "use_responses_lite" {
|
||||
switch field {
|
||||
case "supports_search_tool", "use_responses_lite":
|
||||
fallback = json.RawMessage("false")
|
||||
} else if field == "service_tiers" {
|
||||
case "service_tiers":
|
||||
// Conflicting peers must not advertise any tier, and Codex requires an array.
|
||||
fallback = json.RawMessage("[]")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user