Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 20, 2025

Summary by CodeRabbit

  • Documentation
    • Marked several API endpoints and certain response blocks as deprecated in the public API specification; deprecation notices will appear in docs and client generators.
    • Updated sample code (JS/TS, Python, Java, Go) to clarify that image_url accepts either a base64 data URI or a web URL.
    • No functional changes to request/response schemas aside from deprecation annotations.

@coderabbitai
Copy link

coderabbitai bot commented Sep 20, 2025

Walkthrough

The 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

Cohort / File(s) Summary
API Deprecation Annotations
src/libs/Cohere/openapi.yaml
Added deprecated: true to multiple path operations and certain response nodes (including entries following 504/GatewayTimeout). Marks a wide set of public endpoints/responses as deprecated.
Sample Code Comment Updates
src/libs/Cohere/openapi.yaml
Updated JS/TS, Python, Java, and Go examples with inline comments stating image_url may be a base64 data URI or a web URL; functionality unchanged.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws on deprecations old,
Sunset flags raised, in YAML bold.
A whisper: image_url—base64 or link—
Samples nudged with a clarifying wink.
Ears perked high, I hop ahead to new,
Leaving carrot-crumb trails through docs we grew. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" is vague and does not describe the primary changes in this PR, which mainly add "deprecated: true" flags across many OpenAPI operations/responses and update sample code comments about allowed image_url formats; it reads like a tag or automation label rather than a concise summary of the change. A teammate scanning the history cannot determine the main intent or scope from this title alone. Therefore the title does not meet the guideline of being a short, clear single-sentence summary of the most important change. Please rename the PR to a concise, descriptive title such as "Mark multiple OpenAPI endpoints/responses as deprecated and clarify image_url examples" or "docs(openapi): add deprecated flags and clarify image_url samples", and add a one-line body describing the scope (deprecated flags and sample updates) so reviewers and changelogs are clear. After renaming, re-run checks or request a quick review for title accuracy.
✅ 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_202509200135

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 01:36
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update Cohere OpenAPI to mark deprecations and clarify image_url 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 (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-reason and x-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-sunset to the operation metadata.


1198-1204: Consistent deprecation comms.

Repeat the migration note and optional x-deprecation-reason so 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-reason and 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

📥 Commits

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

⛔ 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 (4)
src/libs/Cohere/openapi.yaml (4)

1271-1277: Deprecation: confirm SDK tags/summaries reflect status.

Ensure summary/tags reflect 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 casing

src/libs/Cohere/openapi.yaml (lines 8775–8787): TS example uses new CohereClientV2({}); model 'command-a-vision-07-2025'; payload has type: "image_url" but nested property imageUrl (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_url everywhere or switch all samples to imageUrl).
  • Model consistency: confirm whether other-language samples (Go) use command-a-03-2025 and align all samples — recommend command-a-vision-07-2025 for vision examples if appropriate.

63-69: No $ref-sibling issue — connectors already deprecated.
The connectors array in src/libs/Cohere/openapi.yaml has items: { $ref: '#/components/schemas/ChatConnector' } while description and deprecated: true are siblings of the connectors property (the array) — the array is already deprecated, so the suggested $ref-sibling removal is not needed.

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