Claude commited on
Commit
f5747b1
·
unverified ·
1 Parent(s): 4d87419

fix: use config settings for model names instead of hardcoded values

Browse files

Model names in app.py were hardcoded to "gpt-4o" and "claude-sonnet-4-20250514".
Now uses settings.openai_model and settings.anthropic_model from config,
allowing model names to be configured via environment variables.

Files changed (1) hide show
  1. src/app.py +3 -2
src/app.py CHANGED
@@ -23,6 +23,7 @@ from src.tools.biorxiv import BioRxivTool
23
  from src.tools.clinicaltrials import ClinicalTrialsTool
24
  from src.tools.pubmed import PubMedTool
25
  from src.tools.search_handler import SearchHandler
 
26
  from src.utils.models import OrchestratorConfig
27
 
28
 
@@ -66,10 +67,10 @@ def configure_orchestrator(
66
  if user_api_key:
67
  if api_provider == "anthropic":
68
  anthropic_provider = AnthropicProvider(api_key=user_api_key)
69
- model = AnthropicModel("claude-sonnet-4-20250514", provider=anthropic_provider)
70
  else:
71
  openai_provider = OpenAIProvider(api_key=user_api_key)
72
- model = OpenAIModel("gpt-4o", provider=openai_provider)
73
  judge_handler = JudgeHandler(model=model)
74
 
75
  return create_orchestrator(
 
23
  from src.tools.clinicaltrials import ClinicalTrialsTool
24
  from src.tools.pubmed import PubMedTool
25
  from src.tools.search_handler import SearchHandler
26
+ from src.utils.config import settings
27
  from src.utils.models import OrchestratorConfig
28
 
29
 
 
67
  if user_api_key:
68
  if api_provider == "anthropic":
69
  anthropic_provider = AnthropicProvider(api_key=user_api_key)
70
+ model = AnthropicModel(settings.anthropic_model, provider=anthropic_provider)
71
  else:
72
  openai_provider = OpenAIProvider(api_key=user_api_key)
73
+ model = OpenAIModel(settings.openai_model, provider=openai_provider)
74
  judge_handler = JudgeHandler(model=model)
75
 
76
  return create_orchestrator(