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

更新视觉模型匹配关键词 #5815

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ export function isVisionModel(model: string) {
const excludeKeywords = ["claude-3-5-haiku-20241022"];
const visionKeywords = [
"vision",
"claude-3",
"gemini-1.5-pro",
"gemini-1.5-flash",
"gpt-4o",
"gpt-4o-mini",
"claude-3",
"gemini-1.5",
"qwen-vl",
"qwen2-vl",
Comment on lines +261 to +264
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Found inconsistencies in model naming and references that need attention

Several issues need to be addressed:

  • The PR removes "gpt-4o-mini" from vision keywords but the model is still referenced in multiple files:

    • app/constant.ts: Used in model lists and SUMMARIZE_MODEL constant
    • app/store/config.ts: Used as ModelType
    • app/config/server.ts: Referenced in model filtering logic
    • app/api/openai.ts: Used in model filtering
  • Gemini model naming inconsistency:

    • Vision keywords use simplified "gemini-1.5" but app/constant.ts still uses specific variants like "gemini-1.5-pro-latest" and "gemini-1.5-flash-latest"
🔗 Analysis chain

LGTM! Changes align perfectly with PR objectives.

The updates to vision model keywords correctly:

  1. Add support for new models (qwen-vl, qwen2-vl)
  2. Simplify Gemini models to a single "gemini-1.5" entry
  3. Maintain coverage of "gpt-4o-mini" through the existing "gpt-4o" keyword

Let's verify the model names are correct:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for model name references in the codebase to ensure consistency
# and verify no references to removed models remain.

echo "Checking for any remaining references to removed models..."
rg "gemini-1\.5-(pro|flash)" --type ts
rg "gpt-4o-mini" --type ts

echo "Verifying new model name usage..."
rg "(qwen-vl|qwen2-vl|claude-3|gemini-1\.5)" --type ts

Length of output: 1903

];
const isGpt4Turbo =
model.includes("gpt-4-turbo") && !model.includes("preview");
Expand Down
Loading