-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Add openAI websearch and claude 4 to modelproviders #7988
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
base: main
Are you sure you want to change the base?
Conversation
@liavar1 is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
👍 @liavar1 Thank you for raising your pull request and contributing to our Community |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces new AI models to LobeChat's provider ecosystem:
- Added Claude 4 Opus and Sonnet models in
src/config/modelProviders/anthropic.ts
with advanced capabilities and pricing structures - Added GPT-4o mini Search Preview model in
src/config/modelProviders/openai.ts
with enhanced web search functionality - Configured search implementation settings for GPT-4o mini Search Preview in
src/config/aiModels/openai.ts
- Set future release dates (May 2025 for Claude 4 models, December 2024 for GPT-4o mini Search)
- Maintained consistent model configuration patterns across providers
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7988 +/- ##
==========================================
+ Coverage 88.41% 95.67% +7.25%
==========================================
Files 822 14 -808
Lines 60436 2519 -57917
Branches 3821 244 -3577
==========================================
- Hits 53435 2410 -51025
+ Misses 7001 109 -6892
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WalkthroughThis PR expands the AI model configurations by adding new and updated models for both OpenAI and Anthropic providers. It introduces the 'GPT-4o mini Search Preview' model, optimized for search and real-time information retrieval, to both the OpenAI chat models and provider configuration. For Anthropic, it adds 'Claude 4 Opus' and 'Claude 4 Sonnet' models, updates their parameters, and restores the standard 'Claude 3.7 Sonnet' model. These changes increase the available model options and update pricing, context windows, and feature support to reflect the latest releases. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
title GPT-4o mini Search Preview Integration Flow
actor User
participant Client as "Client Application"
participant ModelRegistry as "Model Registry"
participant ModelSelector as "Model Selector"
participant GPT4oMiniSearch as "GPT-4o mini Search Preview"
participant SearchTool as "Search Tool"
participant API as "API Service"
User->>Client: Request with search query
activate Client
Client->>ModelRegistry: getAvailableModels()
activate ModelRegistry
ModelRegistry-->>Client: Return available models (including new GPT-4o mini Search Preview)
deactivate ModelRegistry
Client->>ModelSelector: selectModel(requirements)
activate ModelSelector
Note over ModelSelector: Evaluates model capabilities<br/>against requirements
alt Search capability required
ModelSelector-->>Client: Select GPT-4o mini Search Preview
else Other capabilities required
ModelSelector-->>Client: Select different model
end
deactivate ModelSelector
Client->>API: createChatCompletion(model="gpt-4o-mini-search-preview", messages)
activate API
API->>GPT4oMiniSearch: processRequest(messages)
activate GPT4oMiniSearch
alt search=true in abilities
GPT4oMiniSearch->>SearchTool: performSearch(query)
activate SearchTool
Note over SearchTool: searchImpl="tool" from settings
SearchTool-->>GPT4oMiniSearch: Return search results
deactivate SearchTool
GPT4oMiniSearch->>GPT4oMiniSearch: incorporateSearchResults()
Note over GPT4oMiniSearch: Uses 128k context window
end
GPT4oMiniSearch-->>API: Return response
deactivate GPT4oMiniSearch
API-->>Client: Return completion response
deactivate API
Client-->>User: Display response with search-enhanced information
deactivate Client
Note over User, SearchTool: Pricing applied:<br/>- Input: $0.15/1K tokens (or $0.075/1K for cached)<br/>- Output: $0.60/1K tokens<br/>- Max output: 16,384 tokens
Note for WindsurfPlease change the default marketplace provider to the following in the windsurf settings:Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts belowEmoji Descriptions:
Interact with the Bot:
Also you can trigger various commands with the bot by doing The current supported commands are
More commands to be added soon. |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Add openai websearch model and claude 4 to model list
📝 补充信息 | Additional Information