feat:OpenAPI: deprecate endpoints/responses; clarify image_url formats#291
feat:OpenAPI: deprecate endpoints/responses; clarify image_url formats#291
Conversation
WalkthroughOpenAPI spec updated by marking several endpoints and responses as deprecated and by editing code samples across languages to clarify that image_url may be a base64 data URI or a web URL. No behavioral or exported entity changes; modifications are limited to documentation and deprecation metadata. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
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 (12)
src/libs/Cohere/openapi.yaml (12)
63-69: Deprecate connectors with clear migration guidance and SDK visibility flagsSetting
deprecated: trueis fine. Please also guide users to the replacement and surface deprecation in SDKs.
- Add an explicit deprecation note (what to use instead) and a Fern visibility flag so SDKs warn appropriately.
Apply this minimal augmentation:
description: "Accepts {\"id\": \"web-search\"}, and/or the \"id\" for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). Compatible Deployments: Cohere Platform " deprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: prefer the tools interface (e.g., web-search) for RAG."Confirm the exact replacement field/name so we can update the deprecation message precisely.
168-174: Boolean field: add explicit default and deprecation surfacingThe description states “Defaults to false,” but the schema omits
default. Also, surface deprecation in SDKs.Apply:
search_queries_only: type: boolean description: "Defaults to `false`. When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments " deprecated: true + default: false + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: use the tools/web-search flow to retrieve queries without executing search."Please confirm the intended replacement so we can finalize the message text.
1004-1010: Operations deprecated: add sunset and alternative pointersMarking the operation deprecated is correct. Consider adding a sunset date and a “use instead” pointer to smooth migrations and enable tooling.
Example (adjust values):
deprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"Share the replacement path/operationId and planned sunset to embed here.
1128-1134: Repeat: deprecation metadata for this operationMirror the same
x-fern-availability,x-deprecation-message, and optionalx-sunsethere.deprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
1198-1204: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
1271-1277: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
1343-1349: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
1421-1427: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
1501-1507: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
6623-6629: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
7178-7184: Repeat: add SDK-visible deprecation + sunsetdeprecated: true + x-fern-availability: deprecated + x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>." + x-sunset: "YYYY-MM-DD"
8775-8787: Samples: align model names and keep detail consistency
- Go snippet uses a non-vision model while passing
image_urlcontent; switch to the vision model used elsewhere.- Java snippet omits
detail; consider adding for parity with TS/Python/Go.Apply:
- - code: "package main + - code: "package main ... - Model: \"command-a-03-2025\", + Model: \"command-a-vision-07-2025\", ... " name: Images sdk: goOptionally enhance Java:
- - code: "/* (C)2024 */ + - code: "/* (C)2024 */ package chatv2post; import java.util.List; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatRequest; import com.cohere.api.types.ChatMessageV2; import com.cohere.api.types.ChatResponse; import com.cohere.api.types.Content; import com.cohere.api.types.ImageContent; import com.cohere.api.types.ImageUrl; +import com.cohere.api.types.ImageUrlDetail; import com.cohere.api.types.TextContent; import com.cohere.api.types.UserMessage; import com.cohere.api.types.UserMessageContent; ... ImageUrl.builder() // Can be either a base64 data URI or a web URL. .url( \"https://cohere.com/favicon-32x32.png\") + .detail(ImageUrlDetail.AUTO) .build())Confirm that the Go SDK’s vision-capable model identifier matches “command-a-vision-07-2025” for this release.
📜 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)
Summary by CodeRabbit