Skip to content

Conversation

@jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza commented Oct 22, 2025

This PR:

  • Removes some one-off defaulted LLMs from the code base, keeping us centered on Settings
  • Updates LLM defaults to match the latest Anthropic OpenAI model
    • Went with OpenAI to stick to one provider

Previously we used gpt-4o-2024-11-20 for our models. From https://platform.openai.com/docs/models/gpt-4o, https://platform.openai.com/docs/models/gpt-5, and https://docs.claude.com/en/docs/about-claude/models/overview as of 10/20/2025:

Model Input Price (USD/M tokens) Output Price (USD/M tokens) Context Window (tokens) Data Cutoff
gpt-4o-2024-11-20 $2 $10 128k October 2023
gpt-5-2025-08-07 $1.25 $10 400k September 2024
claude-sonnet-4-5-20250929 $3 $15 200k July 2025

@jamesbraza jamesbraza self-assigned this Oct 22, 2025
Copilot AI review requested due to automatic review settings October 22, 2025 00:36
@jamesbraza jamesbraza added the enhancement New feature or request label Oct 22, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 22, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes default LLM selections by:

  • Migrating from OpenAI's GPT-4 to Anthropic's Claude Sonnet 4-5 as the default model
  • Removing hardcoded model defaults in function signatures to rely on centralized settings
  • Updating test cassettes to reflect the model changes

Reviewed Changes

Copilot reviewed 5 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/cassettes/test_partly_embedded_texts[True].yaml Updated test cassette reflecting API interactions with the new default model and updated library versions
src/paperqa/settings.py Changed default LLM from gpt-4o-2024-11-20 to claude-sonnet-4-5-20250929 for agent_llm, llm, and summary_llm; removed unused CommonLLMNames import
src/paperqa/agents/models.py Removed hardcoded default model from get_summary method signature
src/paperqa/agents/helpers.py Made llm parameter required by removing default value and reordering parameters in litellm_get_search_query
README.md Updated documentation to reflect new default models

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@whitead
Copy link
Collaborator

whitead commented Oct 27, 2025

For simplicity, it would be nice to only require one provider. If we change to Anthropic a user needs OpenAI keys and Anthropic keys, right? Because if the embeddings?

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 27, 2025
@jamesbraza
Copy link
Collaborator Author

For simplicity, it would be nice to only require one provider. If we change to Anthropic a user needs OpenAI keys and Anthropic keys, right? Because if the embeddings?

Yeah makes sense, so I just updated to GPT-5. Why I hadn't originally was, GPT-5 requires updating our default temperature to 1.

Copy link
Collaborator

@mskarlin mskarlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants