-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Shortened enum parameter description in OpenAPI specification #243
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
Conversation
WalkthroughThe description for an enum parameter controlling model tool usage behavior in the OpenAPI specification was shortened. A note about equivalent functionality in another endpoint was removed, but the main explanation and compatibility note remain unchanged. No changes were made to exported or public entities. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/libs/Cohere/openapi.yaml (2)
7502-7502
: Clarify wording: “one of” → “any of”; avoid contraction.“forced not to use one of the specified tools” is logically ambiguous. Use “any of the specified tools,” and replace “isn't” with “is not” for spec tone.
Apply this minimal diff:
- description: "Used to control whether or not the model will be forced to use a tool when answering. When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request.\nWhen `NONE` is specified, the model will be forced **not** to use one of the specified tools, and give a direct response.\nIf tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.\n\n**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.\n" + description: "Used to control whether the model will be forced to use a tool when answering. When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request.\nWhen `NONE` is specified, the model will be forced **not** to use any of the specified tools, and will give a direct response.\nIf `tool_choice` is not specified, the model is free to choose whether to use the specified tools or not.\n\n**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.\n"
7502-7502
: Optional: switch to YAML block scalar for readability.Multi-line descriptions are easier to maintain/read as a block scalar instead of escaped newlines.
- description: "Used to control whether or not the model will be forced to use a tool when answering. When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request.\nWhen `NONE` is specified, the model will be forced **not** to use one of the specified tools, and give a direct response.\nIf tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.\n\n**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.\n" + description: |- + Used to control whether the model will be forced to use a tool when answering. + When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request. + When `NONE` is specified, the model will be forced **not** to use any of the specified tools, and will give a direct response. + If `tool_choice` is not specified, the model is free to choose whether to use the specified tools or not. + + Note: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
src/libs/Cohere/Generated/Cohere.CohereClient.Chatv2.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ICohereClient.Chatv2.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.Models.Chatv2RequestToolChoice.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Cohere/openapi.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test / Build, test and publish
🔇 Additional comments (1)
src/libs/Cohere/openapi.yaml (1)
7502-7505
: No stale references detected forforce_single_step
ortool_choice
I’ve verified that:
- The
/v1/chat
endpoint still definesforce_single_step
in src/libs/Cohere/openapi.yaml (around line 80) and in the generated ChatRequest model (ChatRequest.g.cs).- The
tool_choice
description in openapi.yaml (lines 7498–7505) and in all generated Chatv2Request types correctly links to Command-r7b.All links and descriptions remain accurate—no further changes needed.
Summary by CodeRabbit