akseljoonas HF Staff commited on
Commit
fd87f8e
·
1 Parent(s): 9d8d295

Use Haiku for research sub-agent when main model is Anthropic

Browse files
Files changed (1) hide show
  1. agent/tools/research_tool.py +2 -4
agent/tools/research_tool.py CHANGED
@@ -170,11 +170,9 @@ def _resolve_llm_params(model_name: str) -> dict:
170
 
171
  def _get_research_model(main_model: str) -> str:
172
  """Pick a cheaper model for research based on the main model."""
173
- if "opus" in main_model:
174
- return "anthropic/claude-sonnet-4-5-20250929"
175
- if "sonnet" in main_model:
176
  return "anthropic/claude-haiku-3-5-20241022"
177
- # For HF router models, use the same model
178
  return main_model
179
 
180
 
 
170
 
171
  def _get_research_model(main_model: str) -> str:
172
  """Pick a cheaper model for research based on the main model."""
173
+ if "anthropic/" in main_model:
 
 
174
  return "anthropic/claude-haiku-3-5-20241022"
175
+ # For non-Anthropic models (HF router etc.), use the same model
176
  return main_model
177
 
178