feat:Add deprecated flags and update image_url examples in Cohere OpenAPI#303
feat:Add deprecated flags and update image_url examples in Cohere OpenAPI#303
Conversation
WalkthroughAdded deprecated: true flags to multiple OpenAPI paths/responses and updated example code blocks in src/libs/Cohere/openapi.yaml to clarify that image_url inputs can be base64 data URIs or web URLs. One JS sample block was removed/replaced. No runtime logic changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ 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: Add explicit deprecation guidance forconnectors.Marking the property as deprecated is good. Please also add a developer‑visible message and a migration path so SDKs/docs surface it clearly.
Apply a vendor extension right next to
deprecated: true:description: "...(existing)..." deprecated: true + x-deprecationMessage: "Deprecated: replace `connectors` with <new field/flow>. This field will be removed on <date>." x-fern-audiences:
168-174: Deprecate with replacement and timeline forsearch_queries_only.Same ask here: add an explicit deprecation message and successor field/behavior.
description: "...(existing)..." deprecated: true + x-deprecationMessage: "Deprecated: use <replacement flag/endpoint>. Sunset on <date>." x-fern-audiences:
1004-1010: Operation-level deprecation needs migration notes.Setting
deprecated: trueis valid on operations. Add a short note pointing to the replacement operation and (optionally) a sunset date so generators and docs can surface the path forward.responses: '504': $ref: '#/components/responses/GatewayTimeout' deprecated: true +x-deprecationMessage: "This endpoint is deprecated. Migrate to <new operationId/path> by <date>." x-fern-audiences:
1128-1134: Same deprecation messaging gap as above.deprecated: true +x-deprecationMessage: "This endpoint is deprecated. Use <replacement>." x-fern-audiences:
1198-1204: Surface replacement in docs/SDKs for this deprecated operation.deprecated: true +x-deprecationMessage: "Deprecated: see <replacement>." x-fern-audiences:
1271-1277: Repeatable: addx-deprecationMessage.deprecated: true +x-deprecationMessage: "Deprecated: migrate to <replacement>." x-fern-audiences:
1343-1349: Include migration path for consumers.deprecated: true +x-deprecationMessage: "Use <replacement>. Sunset <date>." x-fern-audiences:
1421-1427: Deprecation without alternative will confuse users.deprecated: true +x-deprecationMessage: "Replaced by <replacement>." x-fern-audiences:
1501-1507: Add deprecation message (consistent with other ops).deprecated: true +x-deprecationMessage: "Deprecated endpoint. See <replacement>." x-fern-audiences:
6623-6629: Operation deprecation: provide guidance + (optional) removal date.deprecated: true +x-deprecationMessage: "Deprecated; removal planned <date>. Migrate to <replacement>." x-fern-audiences:
7178-7184: Same as above: addx-deprecationMessage.deprecated: true +x-deprecationMessage: "Use <replacement>." x-fern-audiences:
📜 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)
8772-8787: Example consistency and minor fixes.
- Inconsistent model names: Go uses "command-a-03-2025" while others use "command-a-vision-07-2025". Align or explain.
- cURL Authorization scheme casing: prefer "Bearer" for consistency.
- API key handling: TS/Python snippets instantiate clients without showing token; verify SDKs auto-read env vars; if not, add token examples.
- Detail parameter: Java example omits
detail: "auto"while others include it; consider adding for parity.Minimal diffs for two clear fixes:
- --header "Authorization: bearer $CO_API_KEY" \ + --header "Authorization: Bearer $CO_API_KEY" \- Model: "command-a-03-2025", + Model: "command-a-vision-07-2025",If SDKs do not auto-read env vars, update TS/Python snippets, e.g.:
-const cohere = new CohereClientV2({}); +const cohere = new CohereClientV2({ token: process.env.COHERE_API_KEY });-co = cohere.ClientV2() +co = cohere.ClientV2(api_key=os.environ["CO_API_KEY"])
Summary by CodeRabbit
Documentation
Chores