Skip to content

refactor: restructure new_agent_service with model and default_name f…#857

Open
yashraj-exe wants to merge 1 commit intoWalkover-Web-Solution:mainfrom
yashraj-exe:feature/model_default_name
Open

refactor: restructure new_agent_service with model and default_name f…#857
yashraj-exe wants to merge 1 commit intoWalkover-Web-Solution:mainfrom
yashraj-exe:feature/model_default_name

Conversation

@yashraj-exe
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

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" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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;
}

@yashraj-exe yashraj-exe force-pushed the feature/model_default_name branch from 4a91009 to fe5594b Compare March 26, 2026 14:28
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

Successfully merging this pull request may close these issues.

1 participant