refactor: restructure new_agent_service with model and default_name f…#857
Open
yashraj-exe wants to merge 1 commit intoWalkover-Web-Solution:mainfrom
Open
refactor: restructure new_agent_service with model and default_name f…#857yashraj-exe wants to merge 1 commit intoWalkover-Web-Solution:mainfrom
yashraj-exe wants to merge 1 commit intoWalkover-Web-Solution:mainfrom
Conversation
Comment on lines
+71
to
+78
| openai: { model: "gpt-5-nano", default_name: "OpenAI" }, | ||
| anthropic: { model: "claude-sonnet-4-20250514", default_name: "Anthropic" }, | ||
| groq: { model: "openai/gpt-oss-120b", default_name: "Groq" }, | ||
| open_router: { model: "openai/gpt-4o", default_name: "Open Router" }, | ||
| mistral: { model: "mistral-small-latest", default_name: "Mistral" }, | ||
| gemini: { model: "gemini-2.5-pro", default_name: "Gemini" }, | ||
| ai_ml: { model: "gpt-oss-120b", default_name: "AI ML" }, | ||
| grok: { model: "grok-4-fast", default_name: "Grok" } |
Contributor
There was a problem hiding this comment.
This change modifies the structure of new_agent_service from simple string values to objects with model and default_name properties. Have all references to this object throughout the codebase been updated to use the new structure (e.g., changing new_agent_service.openai to new_agent_service.openai.model)? Since this is a breaking change in the API, any code that directly accesses these values as strings will now break.
Comment on lines
169
to
171
| if (new_agent_service[service]) { | ||
| model_data.model = new_agent_service[service]; | ||
| model_data.model = new_agent_service[service].model; | ||
| } |
Contributor
There was a problem hiding this comment.
The refactoring assumes that new_agent_service[service] always has a .model property. Consider adding a null check to prevent potential runtime errors:
Suggested change
| if (new_agent_service[service]) { | |
| model_data.model = new_agent_service[service]; | |
| model_data.model = new_agent_service[service].model; | |
| } | |
| if (new_agent_service[service] && new_agent_service[service].model) { | |
| model_data.model = new_agent_service[service].model; | |
| } |
4a91009 to
fe5594b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.