Skip to content

Conversation

@JoshuaKirby88
Copy link

Summary

Adds OpenRouter model support across the AI Scientist pipeline, including standardized model naming/normalization and a shared CLI validation helper so users can pass openrouter/<provider>/<model> without editing AVAILABLE_LLMS.

What Changed

  • OpenRouter model routing + normalization

    • Adds support for openrouter// model names across the pipeline.
    • Keeps backward compatibility with the previously supported llama3.1-405b alias (no openrouter/ prefix) by normalizing it to meta-llama/llama-3.1-405b-instruct.
    • Uses the same OpenRouter OpenAI-compatible client config as before, now applied to all OpenRouter models instead of a single hard-coded case.
  • Reusable CLI model validation

    • Introduces validate_model_choice() (argparse type=) to accept either:
      • models in AVAILABLE_LLMS, or
      • anything starting with openrouter/<provider>/<model>
    • Updates CLI argument parsing in the main entrypoints to use this validator instead of choices=AVAILABLE_LLMS:
      • ai_scientist/generate_ideas.py
      • ai_scientist/perform_writeup.py
      • launch_scientist.py
  • Writeup / Aider model selection

    • Replaces the one-off llama3.1-405b handling with generalized OpenRouter handling when constructing aider.models.Model(...) in:
      • ai_scientist/perform_writeup.py
      • launch_scientist.py

Usage

  • Existing models in AVAILABLE_LLMS still work unchanged.
  • New supported format:
    • --model openrouter/<provider>/<model>
    • Example: --model openrouter/meta-llama/llama-3.1-405b-instruct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant