fix(core): add missing oauth fields support in subagent parsing#26141
fix(core): add missing oauth fields support in subagent parsing#26141abhipatel12 merged 2 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the subagent parsing logic to support a more comprehensive set of OAuth configuration fields. By updating both the schema validation and the mapping logic, the system now correctly handles advanced OAuth parameters, ensuring better compatibility with the full MCPOAuthConfig specification. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Size Change: +1.14 kB (0%) Total Size: 33.9 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request expands the OAuth configuration for MCP servers by adding fields such as issuer, audiences, and redirect_uri to the mcpServerSchema and updating the markdownToAgentDefinition function. The review feedback recommends adding URL validation to the new schema fields to ensure robustness and highlights the need to update oauth2AuthSchema and its mapping for remote agents to maintain consistency across the codebase.
|
✅ 55 tests passed successfully on gemini-3-flash-preview. 🧠 Model Steering GuidanceThis PR modifies files that affect the model's behavior (prompts, tools, or instructions).
This is an automated guidance message triggered by steering logic signatures. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request expands the OAuth2 configuration for MCP servers by adding support for several new optional fields, including issuer, audiences, redirect_uri, token_param_name, and registration_url. These changes are reflected in the TypeScript interfaces, Zod validation schemas, and the logic for converting markdown frontmatter to agent definitions. Additionally, the test suite has been updated to verify the correct parsing and mapping of these new fields. I have no feedback to provide.
Summary
Add support for missing OAuth fields in subagent parsing in
agentLoader.tsto match the fullMCPOAuthConfigschema.Details
The current subagent parsing logic was only supporting a subset of fields for
oauthauth type. This PR adds support forissuer,audiences,redirect_uri,token_param_name, andregistration_urlinmcpServerSchemaand maps them correctly inmarkdownToAgentDefinition.Related Issues
Resolves #24836
How to Validate
Run the tests in
agentLoader.test.ts:npm test -w @google/gemini-cli-core -- src/agents/agentLoader.test.tsVerify that the new test case
should convert mcp_servers with auth block in local agent (oauth with full fields)passes.Pre-Merge Checklist