lewtun HF Staff OpenAI Codex commited on
Commit
d32b803
·
unverified ·
1 Parent(s): 437a804

Remove old Claude model support (#283)

Browse files

* Remove Claude Opus 4.6 model support

Co-authored-by: OpenAI Codex <codex@openai.com>

* Remove Claude Opus 4.7 model support

Co-authored-by: OpenAI Codex <codex@openai.com>

* Remove Claude Sonnet 4.6 model support

Co-authored-by: OpenAI Codex <codex@openai.com>

* Remove stale Sonnet model tag test

Co-authored-by: OpenAI Codex <codex@openai.com>

---------

Co-authored-by: OpenAI Codex <codex@openai.com>

agent/core/model_ids.py CHANGED
@@ -2,10 +2,7 @@
2
 
3
  HF_ROUTER_BASE_URL = "https://router.huggingface.co/v1"
4
 
5
- CLAUDE_OPUS_46_MODEL_ID = "anthropic/claude-opus-4.6:fal-ai"
6
- CLAUDE_OPUS_47_MODEL_ID = "anthropic/claude-opus-4.7:fal-ai"
7
  CLAUDE_OPUS_48_MODEL_ID = "anthropic/claude-opus-4.8:fal-ai"
8
- CLAUDE_SONNET_46_MODEL_ID = "anthropic/claude-sonnet-4-6:fal-ai"
9
  GPT_55_MODEL_ID = "openai/gpt-5.5:fal-ai"
10
  KIMI_K26_MODEL_ID = "moonshotai/Kimi-K2.6"
11
  MINIMAX_M27_MODEL_ID = "MiniMaxAI/MiniMax-M2.7"
@@ -15,10 +12,7 @@ DEEPSEEK_V4_PRO_MODEL_ID = "deepseek-ai/DeepSeek-V4-Pro:deepinfra"
15
  DEFAULT_MODEL_ID = CLAUDE_OPUS_48_MODEL_ID
16
 
17
  PREMIUM_MODEL_IDS = {
18
- CLAUDE_OPUS_46_MODEL_ID,
19
- CLAUDE_OPUS_47_MODEL_ID,
20
  CLAUDE_OPUS_48_MODEL_ID,
21
- CLAUDE_SONNET_46_MODEL_ID,
22
  GPT_55_MODEL_ID,
23
  }
24
 
 
2
 
3
  HF_ROUTER_BASE_URL = "https://router.huggingface.co/v1"
4
 
 
 
5
  CLAUDE_OPUS_48_MODEL_ID = "anthropic/claude-opus-4.8:fal-ai"
 
6
  GPT_55_MODEL_ID = "openai/gpt-5.5:fal-ai"
7
  KIMI_K26_MODEL_ID = "moonshotai/Kimi-K2.6"
8
  MINIMAX_M27_MODEL_ID = "MiniMaxAI/MiniMax-M2.7"
 
12
  DEFAULT_MODEL_ID = CLAUDE_OPUS_48_MODEL_ID
13
 
14
  PREMIUM_MODEL_IDS = {
 
 
15
  CLAUDE_OPUS_48_MODEL_ID,
 
16
  GPT_55_MODEL_ID,
17
  }
18
 
agent/core/model_switcher.py CHANGED
@@ -27,8 +27,6 @@ from agent.core.local_models import (
27
  is_reserved_local_model_id,
28
  )
29
  from agent.core.model_ids import (
30
- CLAUDE_OPUS_46_MODEL_ID,
31
- CLAUDE_OPUS_47_MODEL_ID,
32
  CLAUDE_OPUS_48_MODEL_ID,
33
  GPT_55_MODEL_ID,
34
  KIMI_K26_MODEL_ID,
@@ -42,8 +40,6 @@ from agent.core.model_ids import (
42
  # policy (auto = fastest with failover).
43
  SUGGESTED_MODELS = [
44
  {"id": CLAUDE_OPUS_48_MODEL_ID, "label": "Claude Opus 4.8"},
45
- {"id": CLAUDE_OPUS_47_MODEL_ID, "label": "Claude Opus 4.7"},
46
- {"id": CLAUDE_OPUS_46_MODEL_ID, "label": "Claude Opus 4.6"},
47
  {"id": GPT_55_MODEL_ID, "label": "GPT-5.5"},
48
  {"id": "MiniMaxAI/MiniMax-M2.7", "label": "MiniMax M2.7"},
49
  {"id": KIMI_K26_MODEL_ID, "label": "Kimi K2.6"},
 
27
  is_reserved_local_model_id,
28
  )
29
  from agent.core.model_ids import (
 
 
30
  CLAUDE_OPUS_48_MODEL_ID,
31
  GPT_55_MODEL_ID,
32
  KIMI_K26_MODEL_ID,
 
40
  # policy (auto = fastest with failover).
41
  SUGGESTED_MODELS = [
42
  {"id": CLAUDE_OPUS_48_MODEL_ID, "label": "Claude Opus 4.8"},
 
 
43
  {"id": GPT_55_MODEL_ID, "label": "GPT-5.5"},
44
  {"id": "MiniMaxAI/MiniMax-M2.7", "label": "MiniMax M2.7"},
45
  {"id": KIMI_K26_MODEL_ID, "label": "Kimi K2.6"},
agent/tools/research_tool.py CHANGED
@@ -17,10 +17,7 @@ from litellm import Message, acompletion
17
  from agent.core import telemetry
18
  from agent.core.doom_loop import check_for_doom_loop
19
  from agent.core.llm_params import _resolve_llm_params
20
- from agent.core.model_ids import (
21
- CLAUDE_SONNET_46_MODEL_ID,
22
- strip_huggingface_model_prefix,
23
- )
24
  from agent.core.session import Event
25
 
26
  logger = logging.getLogger(__name__)
@@ -223,11 +220,8 @@ RESEARCH_TOOL_SPEC = {
223
 
224
 
225
  def _get_research_model(main_model: str) -> str:
226
- """Pick a cheaper model for research based on the main model."""
227
- normalized = strip_huggingface_model_prefix(main_model) or main_model
228
- if normalized.startswith("anthropic/claude-opus"):
229
- return CLAUDE_SONNET_46_MODEL_ID
230
- return normalized
231
 
232
 
233
  async def research_handler(
@@ -252,13 +246,11 @@ async def research_handler(
252
  user_content = f"Context: {context}\n\n{user_content}"
253
  messages.append(Message(role="user", content=user_content))
254
 
255
- # Use a cheaper/faster model for research
256
  main_model = session.config.model_name
257
  research_model = _get_research_model(main_model)
258
- # Research is a cheap sub-call — cap the main session's effort at "high"
259
- # so a user preference of ``max``/``xhigh`` (valid for Opus 4.6/4.7) doesn't
260
- # propagate to a Sonnet research model that may not accept those levels.
261
- # We also haven't probed this sub-model so we don't know its ceiling.
262
  _pref = getattr(session.config, "reasoning_effort", None)
263
  _capped = "high" if _pref in ("max", "xhigh") else _pref
264
  llm_params = _resolve_llm_params(
 
17
  from agent.core import telemetry
18
  from agent.core.doom_loop import check_for_doom_loop
19
  from agent.core.llm_params import _resolve_llm_params
20
+ from agent.core.model_ids import strip_huggingface_model_prefix
 
 
 
21
  from agent.core.session import Event
22
 
23
  logger = logging.getLogger(__name__)
 
220
 
221
 
222
  def _get_research_model(main_model: str) -> str:
223
+ """Normalize the main model id for the research sub-call."""
224
+ return strip_huggingface_model_prefix(main_model) or main_model
 
 
 
225
 
226
 
227
  async def research_handler(
 
246
  user_content = f"Context: {context}\n\n{user_content}"
247
  messages.append(Message(role="user", content=user_content))
248
 
249
+ # Use the normalized router model for research
250
  main_model = session.config.model_name
251
  research_model = _get_research_model(main_model)
252
+ # Research is a cheap sub-call — cap the main session's effort at "high".
253
+ # We also haven't probed this sub-call's model so we don't know its ceiling.
 
 
254
  _pref = getattr(session.config, "reasoning_effort", None)
255
  _capped = "high" if _pref in ("max", "xhigh") else _pref
256
  llm_params = _resolve_llm_params(
backend/routes/agent.py CHANGED
@@ -55,7 +55,6 @@ from agent.core.hf_access import get_jobs_access
55
  from agent.core.hf_tokens import resolve_hf_request_token
56
  from agent.core.llm_params import _resolve_llm_params
57
  from agent.core.model_ids import (
58
- CLAUDE_OPUS_46_MODEL_ID,
59
  DEEPSEEK_V4_PRO_MODEL_ID,
60
  DEFAULT_MODEL_ID,
61
  GLM_51_MODEL_ID,
@@ -85,12 +84,6 @@ def _available_models() -> list[dict[str, Any]]:
85
  "tier": "pro",
86
  "recommended": True,
87
  },
88
- {
89
- "id": CLAUDE_OPUS_46_MODEL_ID,
90
- "label": "Claude Opus 4.6",
91
- "provider": "huggingface",
92
- "tier": "pro",
93
- },
94
  {
95
  "id": DEFAULT_GPT_MODEL_ID,
96
  "label": "GPT-5.5",
 
55
  from agent.core.hf_tokens import resolve_hf_request_token
56
  from agent.core.llm_params import _resolve_llm_params
57
  from agent.core.model_ids import (
 
58
  DEEPSEEK_V4_PRO_MODEL_ID,
59
  DEFAULT_MODEL_ID,
60
  GLM_51_MODEL_ID,
 
84
  "tier": "pro",
85
  "recommended": True,
86
  },
 
 
 
 
 
 
87
  {
88
  "id": DEFAULT_GPT_MODEL_ID,
89
  "label": "GPT-5.5",
frontend/src/components/Chat/ChatInput.tsx CHANGED
@@ -25,7 +25,6 @@ import JobsUpgradeDialog from '@/components/JobsUpgradeDialog';
25
  import { useAgentStore } from '@/store/agentStore';
26
  import { useSessionStore } from '@/store/sessionStore';
27
  import {
28
- CLAUDE_OPUS_46_MODEL_PATH,
29
  CLAUDE_MODEL_PATH,
30
  GPT_55_MODEL_PATH,
31
  isClaudePath,
@@ -56,13 +55,6 @@ const DEFAULT_MODEL_OPTIONS: ModelOption[] = [
56
  avatarUrl: getHfAvatarUrl(CLAUDE_MODEL_PATH),
57
  recommended: true,
58
  },
59
- {
60
- id: 'claude-opus-4-6',
61
- name: 'Claude Opus 4.6',
62
- description: 'Hugging Face',
63
- modelPath: CLAUDE_OPUS_46_MODEL_PATH,
64
- avatarUrl: getHfAvatarUrl(CLAUDE_OPUS_46_MODEL_PATH),
65
- },
66
  {
67
  id: 'gpt-5.5',
68
  name: 'GPT-5.5',
 
25
  import { useAgentStore } from '@/store/agentStore';
26
  import { useSessionStore } from '@/store/sessionStore';
27
  import {
 
28
  CLAUDE_MODEL_PATH,
29
  GPT_55_MODEL_PATH,
30
  isClaudePath,
 
55
  avatarUrl: getHfAvatarUrl(CLAUDE_MODEL_PATH),
56
  recommended: true,
57
  },
 
 
 
 
 
 
 
58
  {
59
  id: 'gpt-5.5',
60
  name: 'GPT-5.5',
frontend/src/utils/model.ts CHANGED
@@ -6,13 +6,11 @@
6
  * AVAILABLE_MODELS in backend/routes/agent.py.
7
  */
8
 
9
- export const CLAUDE_OPUS_46_MODEL_PATH = 'anthropic/claude-opus-4.6:fal-ai';
10
  export const CLAUDE_OPUS_48_MODEL_PATH = 'anthropic/claude-opus-4.8:fal-ai';
11
  export const CLAUDE_MODEL_PATH = CLAUDE_OPUS_48_MODEL_PATH;
12
  export const GPT_55_MODEL_PATH = 'openai/gpt-5.5:fal-ai';
13
 
14
  const PREMIUM_MODEL_PATHS = new Set([
15
- CLAUDE_OPUS_46_MODEL_PATH,
16
  CLAUDE_OPUS_48_MODEL_PATH,
17
  GPT_55_MODEL_PATH,
18
  ]);
 
6
  * AVAILABLE_MODELS in backend/routes/agent.py.
7
  */
8
 
 
9
  export const CLAUDE_OPUS_48_MODEL_PATH = 'anthropic/claude-opus-4.8:fal-ai';
10
  export const CLAUDE_MODEL_PATH = CLAUDE_OPUS_48_MODEL_PATH;
11
  export const GPT_55_MODEL_PATH = 'openai/gpt-5.5:fal-ai';
12
 
13
  const PREMIUM_MODEL_PATHS = new Set([
 
14
  CLAUDE_OPUS_48_MODEL_PATH,
15
  GPT_55_MODEL_PATH,
16
  ]);
tests/unit/test_agent_model_gating.py CHANGED
@@ -33,7 +33,6 @@ def _premium_session(model: str = agent.DEFAULT_PREMIUM_MODEL_ID):
33
 
34
  def test_premium_model_predicate_uses_router_ids_only():
35
  assert agent._is_premium_model(agent.DEFAULT_PREMIUM_MODEL_ID)
36
- assert agent._is_premium_model(agent.CLAUDE_OPUS_46_MODEL_ID)
37
  assert agent._is_premium_model(agent.DEFAULT_GPT_MODEL_ID)
38
  assert agent._is_user_billed(agent.DEFAULT_PREMIUM_MODEL_ID)
39
  assert not agent._is_premium_model("moonshotai/Kimi-K2.6")
 
33
 
34
  def test_premium_model_predicate_uses_router_ids_only():
35
  assert agent._is_premium_model(agent.DEFAULT_PREMIUM_MODEL_ID)
 
36
  assert agent._is_premium_model(agent.DEFAULT_GPT_MODEL_ID)
37
  assert agent._is_user_billed(agent.DEFAULT_PREMIUM_MODEL_ID)
38
  assert not agent._is_premium_model("moonshotai/Kimi-K2.6")
tests/unit/test_cli_rendering.py CHANGED
@@ -13,10 +13,10 @@ from agent.tools.research_tool import _get_research_model
13
  from agent.utils import terminal_display
14
 
15
 
16
- def test_router_anthropic_research_downgrades_to_router_sonnet():
17
  assert (
18
  _get_research_model("anthropic/claude-opus-4.8:fal-ai")
19
- == "anthropic/claude-sonnet-4-6:fal-ai"
20
  )
21
 
22
 
@@ -26,13 +26,12 @@ def test_non_anthropic_research_model_is_unchanged():
26
 
27
  def test_huggingface_prefix_research_model_strips_prefix():
28
  assert (
29
- _get_research_model("huggingface/anthropic/claude-opus-4.6:fal-ai")
30
- == "anthropic/claude-sonnet-4-6:fal-ai"
31
  )
32
 
33
 
34
  def test_hf_router_openai_research_model_is_unchanged():
35
- # No Sonnet equivalent for GPT — research stays on the same router model.
36
  assert (
37
  _get_research_model("huggingface/openai/gpt-5.5:fal-ai")
38
  == "openai/gpt-5.5:fal-ai"
 
13
  from agent.utils import terminal_display
14
 
15
 
16
+ def test_router_anthropic_research_model_is_unchanged():
17
  assert (
18
  _get_research_model("anthropic/claude-opus-4.8:fal-ai")
19
+ == "anthropic/claude-opus-4.8:fal-ai"
20
  )
21
 
22
 
 
26
 
27
  def test_huggingface_prefix_research_model_strips_prefix():
28
  assert (
29
+ _get_research_model("huggingface/anthropic/claude-opus-4.8:fal-ai")
30
+ == "anthropic/claude-opus-4.8:fal-ai"
31
  )
32
 
33
 
34
  def test_hf_router_openai_research_model_is_unchanged():
 
35
  assert (
36
  _get_research_model("huggingface/openai/gpt-5.5:fal-ai")
37
  == "openai/gpt-5.5:fal-ai"
tests/unit/test_sft_tagger.py CHANGED
@@ -21,9 +21,6 @@ def _traj(events=None, messages=None, model="anthropic/claude-opus-4.8:fal-ai"):
21
 
22
  def test_model_family():
23
  assert "model:opus" in tag_session(_traj(model="anthropic/claude-opus-4.8:fal-ai"))
24
- assert "model:sonnet" in tag_session(
25
- _traj(model="anthropic/claude-sonnet-4-6:fal-ai")
26
- )
27
  assert "model:kimi" in tag_session(_traj(model="moonshotai/Kimi-K2.6"))
28
  assert "model:other" in tag_session(_traj(model="unknown-model-xyz"))
29
 
 
21
 
22
  def test_model_family():
23
  assert "model:opus" in tag_session(_traj(model="anthropic/claude-opus-4.8:fal-ai"))
 
 
 
24
  assert "model:kimi" in tag_session(_traj(model="moonshotai/Kimi-K2.6"))
25
  assert "model:other" in tag_session(_traj(model="unknown-model-xyz"))
26