Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 20, 2025

Summary by CodeRabbit

  • Documentation

    • Marked several API endpoints and response objects as deprecated in the public API specification to signal upcoming changes.
    • Clarified SDK code samples across languages that image_url.url can be a base64 data URI or a web URL.
  • Chores

    • Updated API spec annotations to reflect deprecations without altering existing interfaces or behavior.

@coderabbitai
Copy link

coderabbitai bot commented Sep 20, 2025

Walkthrough

The 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

Cohort / File(s) Summary of changes
Deprecation flags in OpenAPI
src/libs/Cohere/openapi.yaml
Added deprecated: true to multiple paths and specific responses to indicate deprecation status in the API surface.
SDK sample comment updates
src/libs/Cohere/openapi.yaml
Updated code samples (JS/TS, Python, Java, Go, etc.) with comments noting image_url.url may be a base64 data URI or a web URL. No schema or flow changes.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit reads the spec by moonlit glow,
Toggling flags that whisper “time to go.”
Notes by the samples, crisp and clear—
“Base64 or URL, both welcome here!”
I thump my paws, revisions neat—
Deprecated paths, and docs complete. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is not a clear, descriptive summary of the changes in this PR; it reads like an attribution or tag rather than a concise description of the primary edits. The changeset actually marks multiple OpenAPI paths/responses as deprecated and updates SDK code sample comments about image_url, which the current title does not convey. Please rename the PR to a short, specific title reflecting the main change, for example "chore(openapi): deprecate multiple endpoints and clarify image_url examples" or "docs(openapi): mark endpoints deprecated and update SDK samples"; include a scope (e.g., openapi) and a brief action word (chore/docs/feat) so reviewers immediately understand the intent.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509202115

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HavenDV HavenDV enabled auto-merge (squash) September 20, 2025 21:16
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark endpoints/responses deprecated, clarify image_url formats in SDK Sep 20, 2025
Copy link

@coderabbitai coderabbitai bot left a 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: true at the operation level is valid. Add a “Deprecated” note in the operation description with replacement endpoint(s) and, if available, an Sunset response header or an x-sunset extension 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-2025 for text/chat samples and command-a-vision-07-2025 only 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[]); leave response.message... accesses as-is. (docs.cohere.com)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 111c2a6 and b19f21b.

⛔ Files ignored due to path filters (21)
  • src/libs/Cohere/Generated/Cohere.CohereClient.Chat.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs is 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 required

The connectors property in src/libs/Cohere/openapi.yaml (≈lines 60–66) already has deprecated: true as a sibling of items, so the original concern about the deprecation being placed on items/$ref is incorrect.

Likely an incorrect or invalid review comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants