-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Mark endpoints/responses deprecated, clarify image_url formats in SDK #295
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 file was updated to mark several endpoints and responses as deprecated and to insert clarifying comments in SDK code samples about acceptable image_url formats (base64 data URIs or web URLs). No functional interfaces or executable logic were changed. Changes
Sequence Diagram(s)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.
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 (7)
src/libs/Cohere/openapi.yaml (7)
168-171: OK to deprecate the property; add migration guidance.Good use of
deprecated: true. Add a short sentence in the description pointing to the replacement field/flow to aid SDK users and avoid silent breakage.
1004-1007: Operation deprecation is correct; include migration path and sunset.
deprecated: trueat the operation level is valid. Add a “Deprecated” note in the operation description with replacement endpoint(s) and, if available, anSunsetresponse header or anx-sunsetextension to communicate timelines.
1128-1131: Same as above for this operation.Add explicit replacement guidance and deprecation timeline to avoid ambiguity for SDK consumers.
1198-1201: Deprecation acknowledged; document impact.Call out behavior differences or response shape changes in the suggested replacement to smooth migrations.
1421-1424: Deprecation OK; consider feature flag gating.If backend behavior changed, consider a server-side feature flag to protect legacy clients during migration.
7178-7181: Deprecation OK; provide fallback guidance.Document recommended retries/alternatives for clients relying on this operation’s failure modes.
8775-8787: Action: Update Node examples to ESM imports; clarify model choices & image limits; no change needed for response.message.
- Replace CommonJS requires in the Node snippets with the ESM form:
import { CohereClientV2 } from 'cohere-ai'(examples in src/libs/Cohere/openapi.yaml — e.g. lines ~7549, 7590, 7732, 7860, 7934, 8065, 8775). SDK/readme shows import usage. (npmjs.com)- Model IDs: keep
command-a-03-2025for text/chat samples andcommand-a-vision-07-2025only for image samples (vision model is intentional); add a one-line note explaining that distinction. (docs.cohere.com)- Add one short line outside code blocks near the image sample stating acceptable MIME types and limits (e.g., image/png, image/jpeg; Command A Vision: up to 20 images or ~20MB total; embed endpoints additionally document jpeg/png and smaller per-image limits). (docs.cohere.com)
- Response shape: v2 chat responses use
response.message(singular with content[]); leaveresponse.message...accesses as-is. (docs.cohere.com)
📜 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 (5)
src/libs/Cohere/openapi.yaml (5)
1271-1274: Deprecation OK; ensure consistent tagging.Confirm tags/operationId remain stable until removal to keep codegen diffs minimal.
1343-1346: Deprecation OK; add changelog entry.Please add an entry in your changelog/release notes referencing this operation’s deprecation.
1501-1504: Deprecation OK; verify client SDK annotations.Ensure generated SDKs propagate deprecation annotations (e.g., @deprecated, JsDoc) for this operation.
6623-6626: Deprecation OK; add deprecation tests.Consider adding contract tests that assert the operation is marked deprecated to prevent accidental reversion.
63-66: Deprecation already applied at the property level — no change requiredThe connectors property in src/libs/Cohere/openapi.yaml (≈lines 60–66) already has
deprecated: trueas a sibling ofitems, so the original concern about the deprecation being placed onitems/$ref is incorrect.Likely an incorrect or invalid review comment.
Summary by CodeRabbit
Documentation
Chores