-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Update Cohere OpenAPI to mark deprecations and clarify image_url #288
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
WalkthroughThe OpenAPI spec for Cohere was updated to mark numerous endpoints and some response sections as deprecated and to add inline comments in multi-language code samples clarifying that image_url accepts base64 data URIs or web URLs. No request/response schemas were modified. Changes
Sequence Diagram(s)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 (8)
src/libs/Cohere/openapi.yaml (8)
168-174: Schema says default=false in text; add an explicit default.The description states “Defaults to false” but the schema lacks
default: false. Add it to prevent drift across tooling.search_queries_only: type: boolean description: "Defaults to `false`...." + default: false deprecated: true
1004-1010: Operation deprecation: add migration guidance and (optional) sunset metadata.Marking the operation deprecated is fine. Please add a one‑line note in the operation description pointing to the replacement, and consider vendor extensions like
x-deprecation-reasonandx-sunset(date) so SDKs/docs can surface timelines.No change required to this exact hunk; update the operation block’s description nearby.
1128-1134: Same as above: deprecation needs replacement guidance.Add a brief “Use <new‑path>” note and optional
x-sunsetto the operation metadata.
1198-1204: Consistent deprecation comms.Repeat the migration note and optional
x-deprecation-reasonso generators can display it.
1343-1349: Deprecation without alternative can confuse users.Please reference the successor endpoint or parameter set in the description.
1421-1427: Repeatable: add replacement pointer + optional timeline.Same guidance as earlier hunks.
1501-1507: Docs hygiene for deprecations.Add
x-deprecation-reasonand a link to migration docs if available.
6623-6629: Bulk deprecations: consider a top‑level changelog entry.Given the number of deprecated ops, add a short “Breaking changes”/“Deprecations” section in release notes or top‑level README to aggregate the impact.
📜 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 (4)
src/libs/Cohere/openapi.yaml (4)
1271-1277: Deprecation: confirm SDK tags/summaries reflect status.Ensure
summary/tagsreflect deprecation in rendered docs to avoid silent breakage.
7178-7184: Verify client SDK stability.Confirm these ops aren’t used by codegen for “default examples” to avoid failing quickstarts after release.
8775-8787: TS sample: add API token, unify model name, fix image-field casingsrc/libs/Cohere/openapi.yaml (lines 8775–8787): TS example uses
new CohereClientV2({}); model'command-a-vision-07-2025'; payload hastype: "image_url"but nested propertyimageUrl(casing mismatch).
- Add API token in TS sample:
-const cohere = new CohereClientV2({}); +const cohere = new CohereClientV2({ token: process.env.CO_API_KEY });
- Fix casing: make payload keys consistent (use
image_urleverywhere or switch all samples toimageUrl).- Model consistency: confirm whether other-language samples (Go) use
command-a-03-2025and align all samples — recommendcommand-a-vision-07-2025for vision examples if appropriate.
63-69: No $ref-sibling issue — connectors already deprecated.
Theconnectorsarray in src/libs/Cohere/openapi.yaml hasitems: { $ref: '#/components/schemas/ChatConnector' }whiledescriptionanddeprecated: trueare siblings of theconnectorsproperty (the array) — the array is already deprecated, so the suggested $ref-sibling removal is not needed.Likely an incorrect or invalid review comment.
Summary by CodeRabbit