feat:Deprecate operations in Cohere openapi.yaml; clarify image_url samples#305
feat:Deprecate operations in Cohere openapi.yaml; clarify image_url samples#305
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.
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: trueat the property schema. Please add an explicit replacement pointer and rationale to aid SDK/codegen consumers (e.g.,x-deprecation-messageand/or augmentdescriptionwith “Use <new field/endpoint> instead”). Also verify this property’s parent schema declarestype: arrayaboveitems(not visible in the hunk).
168-174: Parameter deprecation needs successor guidance.Marking
search_queries_onlyas 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
DeprecationandSunset(RFC 8594).- A
Linkheader 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/Sunsetand aLinkto 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/Sunsetheaders 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.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.csis 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