Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommendation: Utilize Model Aliases for Latest Versions (Gemini, Claude, OpenAI) #21

Open
creosB opened this issue Feb 9, 2025 · 2 comments

Comments

@creosB
Copy link

creosB commented Feb 9, 2025

Currently, we're specifying specific version numbers for AI models from Gemini, Claude, and Chatgpt directly in our code (gemini-2.0-flash-thinking-exp-01-21, claude-3-5-sonnet-20241022). This approach requires manual updates whenever new model versions are released, leading to potential maintenance overhead and the risk of using outdated models.

Gemini

According to the Gemini documentation, using model aliases like gemini-2.0-flash-thinking-exp allows you to access the latest version of the model without needing to change the model name in your code when updates occur.

Here's an example of using Gemini model aliases:

  const geminiModels = [
    { value: "gemini-1.5-flash", label: "Gemini 1.5 Flash" },
    { value: "gemini-1.5-pro", label: "Gemini 1.5 Pro" },
    { value: "gemini-2.0-flash", label: "Gemini 2.0 Flash" },
    { value: "gemini-2.0-pro-exp", label: "Gemini 2.0 Pro" },
    { value: "gemini-2.0-flash-thinking-exp", label: "Gemini 2.0 Flash Thinking" },
  ];

Claude

According to the Claude Documentation, you can use aliases like "claude-3-5-sonnet-latest" to always target the latest version. Alternatively, using date specific aliases like "claude-3-5-sonnet-20241022" provides consistency by locking in a specific model snapshot.

Here's an example of Claude model configuration:

  const claudeModels = [
    { value: "claude-3-5-sonnet-latest", label: "Claude 3.5 Sonnet Latest" },
    { value: "claude-3-5-sonnet-20241022", label: "Claude 3.5 20241022"}
  ];

Chatgpt

Similar to Claude, OpenAI also offers "latest" aliases for Chatgpt models, such as "chatgpt-4o-latest". This is detailed in the OpenAI Models documentation.

Here's an example of using Chatgpt model aliases:

  const openaiModels = [
    { value: "gpt-4o", label: "Chatgpt 4o" }, // Assuming this resolves to the latest or "chatgpt-4o-latest"
    { value: "gpt-4o-mini", label: "Chatgpt 4o Mini" },
    { value: "gpt-o1-mini", label: "Chatgpt o1 Mini" },
    { value: "gpt-o1", label: "Chatgpt  o1" },
    { value: "gpt-o3-mini", label: "Chatgpt  o3 Mini" },
  ];
@eastlondoner
Copy link
Owner

excellent. The AI team loves a well written issue

@eastlondoner
Copy link
Owner

Team: we should default to:

gemini-2.0-flash-thinking-exp for codebases under ~1M tokens (keep the existing switch over size
gemini-2.0-pro-exp for codebases over that size (it's the only model that can go over 1M tokens)

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

No branches or pull requests

2 participants