Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 20, 2025

Summary by CodeRabbit

  • Documentation
    • Marked multiple API endpoints and specific responses as deprecated in the OpenAPI specification; deprecation badges will appear in the API reference.
    • Updated code samples (JavaScript, TypeScript, Python, Java, Go) to state that image_url accepts either a base64 data URI or a web URL.
    • Changes affect documentation and examples only; no API behavior changes.

@HavenDV HavenDV enabled auto-merge (squash) September 20, 2025 09:19
@coderabbitai
Copy link

coderabbitai bot commented Sep 20, 2025

Walkthrough

OpenAPI spec updated by marking several endpoints and responses as deprecated and by editing code samples across languages to clarify that image_url may be a base64 data URI or a web URL. No behavioral or exported entity changes; modifications are limited to documentation and deprecation metadata.

Changes

Cohort / File(s) Summary
Deprecation metadata updates
src/libs/Cohere/openapi.yaml
Added deprecated: true to numerous paths/responses, including 504 and service-unavailable response chains and several grouped operations.
Code sample comment clarifications
src/libs/Cohere/openapi.yaml
Updated JavaScript/TypeScript/Python/Java/Go samples with inline comments noting image_url accepts base64 data URIs or web URLs; no functional changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit scribbles notes in YAML light,
Deprecations marked, tucked snug and tight.
“image_url? base64 or web!” I cheer,
Samples tidy, nothing to fear.
Ears perked high, I stamp and grin—
Docs hop forward; let clarity win. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" does not describe the main changes in this PR, which update src/libs/Cohere/openapi.yaml to mark many endpoints/responses as deprecated and adjust inline comments in code samples; instead it appears as a tag or bot signature and is not informative for reviewers. It is not a concise summary of the primary change and therefore fails to convey the PR's purpose to someone scanning history. Because it does not reflect the changeset, the title does not meet the project's title guidelines. Rename the PR to a short, specific title such as "chore(openapi): mark multiple endpoints deprecated and update code sample comments" or "docs(openapi): add deprecation flags and clarify image_url examples", and update the description to list the affected paths and note that code-sample edits are documentation-only so reviewers know what to focus on. After renaming, request reviewers or re-run checks to confirm the title now clearly summarizes the main change.
✅ 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_202509200919

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.

@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: deprecate endpoints/responses; clarify image_url formats 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 (12)
src/libs/Cohere/openapi.yaml (12)

63-69: Deprecate connectors with clear migration guidance and SDK visibility flags

Setting deprecated: true is fine. Please also guide users to the replacement and surface deprecation in SDKs.

  • Add an explicit deprecation note (what to use instead) and a Fern visibility flag so SDKs warn appropriately.

Apply this minimal augmentation:

   description: "Accepts {\"id\": \"web-search\"}, and/or the \"id\" for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.

 When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).

 Compatible Deployments: Cohere Platform
 "
   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: prefer the tools interface (e.g., web-search) for RAG."

Confirm the exact replacement field/name so we can update the deprecation message precisely.


168-174: Boolean field: add explicit default and deprecation surfacing

The description states “Defaults to false,” but the schema omits default. Also, surface deprecation in SDKs.

Apply:

 search_queries_only:
   type: boolean
   description: "Defaults to `false`.

 When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.

 Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
 "
   deprecated: true
+  default: false
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: use the tools/web-search flow to retrieve queries without executing search."

Please confirm the intended replacement so we can finalize the message text.


1004-1010: Operations deprecated: add sunset and alternative pointers

Marking the operation deprecated is correct. Consider adding a sunset date and a “use instead” pointer to smooth migrations and enable tooling.

Example (adjust values):

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

Share the replacement path/operationId and planned sunset to embed here.


1128-1134: Repeat: deprecation metadata for this operation

Mirror the same x-fern-availability, x-deprecation-message, and optional x-sunset here.

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

1198-1204: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

1271-1277: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

1343-1349: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

1421-1427: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

1501-1507: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

6623-6629: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

7178-7184: Repeat: add SDK-visible deprecation + sunset

   deprecated: true
+  x-fern-availability: deprecated
+  x-deprecation-message: "Deprecated: migrate to <new-path-or-operationId>."
+  x-sunset: "YYYY-MM-DD"

8775-8787: Samples: align model names and keep detail consistency

  • Go snippet uses a non-vision model while passing image_url content; switch to the vision model used elsewhere.
  • Java snippet omits detail; consider adding for parity with TS/Python/Go.

Apply:

-            - code: "package main
+            - code: "package main
 ...
-    Model: \"command-a-03-2025\",
+    Model: \"command-a-vision-07-2025\",
 ...
 "
               name: Images
               sdk: go

Optionally enhance Java:

-            - code: "/* (C)2024 */
+            - code: "/* (C)2024 */
 package chatv2post;

 import java.util.List;

 import com.cohere.api.Cohere;
 import com.cohere.api.resources.v2.requests.V2ChatRequest;
 import com.cohere.api.types.ChatMessageV2;
 import com.cohere.api.types.ChatResponse;
 import com.cohere.api.types.Content;
 import com.cohere.api.types.ImageContent;
 import com.cohere.api.types.ImageUrl;
+import com.cohere.api.types.ImageUrlDetail;
 import com.cohere.api.types.TextContent;
 import com.cohere.api.types.UserMessage;
 import com.cohere.api.types.UserMessageContent;
 ...
                                                                 ImageUrl.builder()
                                                                         // Can be either a base64 data URI or a web URL.
                                                                         .url(
                                                                                 \"https://cohere.com/favicon-32x32.png\")
+                                                                        .detail(ImageUrlDetail.AUTO)
                                                                         .build())

Confirm that the Go SDK’s vision-capable model identifier matches “command-a-vision-07-2025” for this release.

📜 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 63325d2.

⛔ 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)

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