mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-21 07:00:23 +00:00
fix(#4536): block Codex models from priority service tier
This commit is contained in:
committed by
nesquena-hermes
parent
cae551f4a6
commit
4d64c18832
+2
-1
@@ -3522,9 +3522,10 @@ def _main_model_supports_service_tier(
|
||||
return False
|
||||
else:
|
||||
bare_model = raw_model
|
||||
if "codex" in bare_model:
|
||||
return False
|
||||
return (
|
||||
_is_first_party_model("openai", bare_model)
|
||||
or _is_first_party_model("openai-codex", bare_model)
|
||||
or bare_model.startswith(("gpt-", "o1", "o3", "o4"))
|
||||
)
|
||||
|
||||
|
||||
@@ -9701,6 +9701,7 @@ function _mainModelSupportsServiceTier(cfg){
|
||||
if(rawModel.slice(0,slash)!=='openai') return false;
|
||||
bareModel=rawModel.slice(slash+1);
|
||||
}
|
||||
if(bareModel.includes('codex')) return false;
|
||||
return bareModel.startsWith('gpt-')||bareModel.startsWith('o1')||bareModel.startsWith('o3')||bareModel.startsWith('o4');
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ class TestAuxiliaryModelsJS:
|
||||
assert "_mainModelSupportsServiceTier" in PANELS_JS
|
||||
assert "rawModel.includes('/')" in helper_body
|
||||
assert "rawModel.slice(0,slash)!=='openai'" in helper_body
|
||||
assert "bareModel.includes('codex')" in helper_body
|
||||
assert "bareModel.startsWith('gpt-')" in helper_body
|
||||
assert "bareModel.startsWith('o4')" in helper_body
|
||||
assert "auxAdvancedServiceTier" in modal_body
|
||||
|
||||
@@ -69,6 +69,11 @@ class TestIssue4536ServiceTier:
|
||||
)
|
||||
assert openai_alias_payload == {"service_tier": "priority"}
|
||||
|
||||
codex_payload = config._main_model_request_overrides(
|
||||
{"model": {"provider": "openai-codex", "default": "gpt-5.3-codex", "service_tier": "priority"}},
|
||||
)
|
||||
assert codex_payload == {}
|
||||
|
||||
stale_openai_payload = config._main_model_request_overrides(
|
||||
{"model": {"provider": "openai", "default": "meta-llama/llama-3.1", "service_tier": "priority"}},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user