-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Deprecate operations in Cohere openapi.yaml; clarify image_url samples #305
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
WalkthroughMarked numerous API operations in src/libs/Cohere/openapi.yaml as deprecated via metadata updates. Also adjusted embedded multi-language sample snippets to clarify that image_url can be a base64 data URI or a web URL. No functional logic or public signatures changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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. Comment |
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 (11)
src/libs/Cohere/openapi.yaml (11)
63-69
: Schema-level deprecation added—document the migration path.Good use of
deprecated: true
at the property schema. Please add an explicit replacement pointer and rationale to aid SDK/codegen consumers (e.g.,x-deprecation-message
and/or augmentdescription
with “Use <new field/endpoint> instead”). Also verify this property’s parent schema declarestype: array
aboveitems
(not visible in the hunk).
168-174
: Parameter deprecation needs successor guidance.Marking
search_queries_only
as deprecated is fine; include the intended alternative (field/flag) and expected removal/sunset date in the description or via a vendor extension to minimize breaking changes during regeneration.
1004-1010
: Operation deprecated—add Deprecation/Sunset headers and a successor link.Consider adding:
- A brief deprecation note in
description
.- Response headers
Deprecation
andSunset
(RFC 8594).- A
Link
header withrel="successor-version"
(or vendor extension likex-replaced-by
) to the new path.Example patch near this operation:
'504': $ref: '#/components/responses/GatewayTimeout' - deprecated: true + deprecated: true + description: "Deprecated. Use POST /v2/chat instead." + responses: + default: + headers: + Deprecation: + schema: { type: string } + description: "true or date" + Sunset: + schema: { type: string, format: date-time } + description: "Service sunset date/time" + Link: + schema: { type: string } + description: 'e.g., </v2/chat>; rel="successor-version"'
1128-1134
: Repeat: deprecation metadata is good; include migration details.Same recommendation as prior hunk: deprecation description + headers and successor pointer.
1198-1204
: Repeat: strengthen deprecation with operational guidance.Add Deprecation/Sunset headers and successor path reference.
1271-1277
: Repeat: clarify deprecation intent.Please add a short description and successor link/header metadata.
1343-1349
: Repeat: add headers + replacement pointer.Ensure clients see
Deprecation
/Sunset
and aLink
to the replacement operation.
1421-1427
: Repeat: operation-level deprecation hygiene.Add deprecation description and response headers for smoother migration.
1501-1507
: Repeat: deprecation UX for clients.Include
Deprecation
/Sunset
headers and successor operation reference.
6623-6629
: Repeat: complete the deprecation story.Document alternative endpoint and add deprecation headers.
7178-7184
: Repeat: add migration breadcrumbs.Provide replacement path and headers so SDKs can surface clear warnings.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (21)
src/libs/Cohere/Generated/Cohere.CohereClient.Chat.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.cs
is excluded by!**/generated/**
src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Cohere/openapi.yaml
(12 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)
8775-8787
: Align Go sample to a vision-capable modelGo example sends image_url but sets Model: "command-a-03-2025" (non‑vision). Replace with a vision model, e.g. Model: "command-a-vision-07-2025". Verification: OpenAPI validation returned OK, but ripgrep produced no matches for the Go 'Model: "command-.*"' pattern in src/libs/Cohere/openapi.yaml — confirm the sample at src/libs/Cohere/openapi.yaml (lines 8775–8787) and apply the model change if present.
Summary by CodeRabbit