Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 19, 2025

Summary by CodeRabbit

  • Chores
    • Marked many public API operations as deprecated in the published specification. No new endpoints or data models, and no runtime behavior changes.
  • Documentation
    • Updated Images examples across SDKs (TypeScript/JavaScript, Python, Java, Go, C) to clarify that image_url can be either a base64 data URI or a web URL. Examples were clarified without altering APIs or functionality.

@coderabbitai
Copy link

coderabbitai bot commented Sep 19, 2025

Walkthrough

Marked multiple public API operations in src/libs/Cohere/openapi.yaml as deprecated and updated Images example code comments across languages to clarify that image_url accepts a base64 data URI or a web URL. No new endpoints or models were added.

Changes

Cohort / File(s) Summary
API deprecation flags
src/libs/Cohere/openapi.yaml
Added deprecated: true to numerous public operations across multiple path items; existing responses (incl. 504 GatewayTimeout) and x-fern-audiences: public remain unchanged.
Images examples clarifications
src/libs/Cohere/openapi.yaml (Images example blocks for TypeScript/JavaScript, Python, Java, Go, C)
Inserted inline comments noting image_url may be a base64 data URI or a web URL in multi-language sample snippets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • github-actions

Poem

A rabbit taps keys with a gentle cheer,
Flagging old paths: “deprecated” here and here.
Samples now whisper, “URLs or base64, you choose!”
Docs hop smoother, no room to lose.
Thump-thump—PR merged, trails made clear. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is vague and does not describe the primary changes in this branch (adding deprecated: true to many OpenAPI operations and clarifying Images examples); it looks like an automation or handle rather than a concise summary of intent, so it doesn't communicate the main change to reviewers. Please rename the title to a short, descriptive sentence that summarizes the main change; for example "chore(openapi): mark multiple public operations as deprecated" or "docs(openapi): deprecate endpoints and clarify Images example image_url usage". Use a conventional prefix (chore/docs) if appropriate and avoid usernames or automation tags so the PR intent is immediately clear.
✅ 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_202509190922

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 19, 2025 09:23
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate Cohere API operations and clarify image_url data URI/URL Sep 19, 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: 1

🧹 Nitpick comments (1)
src/libs/Cohere/openapi.yaml (1)

66-66: Consider adding deprecation notices with migration guidance.

The connectors parameter and search_queries_only parameter are marked as deprecated but lack explicit deprecation notices in their descriptions. This could leave users uncertain about alternatives or timelines.

Consider updating the descriptions to include deprecation notices:

-                  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.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n"
+                  description: "**DEPRECATED:** This parameter is deprecated and will be removed in a future version. Please use [alternative approach] instead.\n\nAccepts `{\"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.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n"

And similarly for search_queries_only:

-                  description: "Defaults to `false`.\n\nWhen `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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"
+                  description: "**DEPRECATED:** This parameter is deprecated and will be removed in a future version. Please use [alternative approach] instead.\n\nDefaults to `false`.\n\nWhen `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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"

Also applies to: 171-171

📜 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 7c07f78.

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

8775-8775: LGTM! Clear documentation improvement for image URL parameter.

The added comments in the code examples clearly explain that image_url/url can accept both base64 data URIs and web URLs across all language SDKs. This improves developer experience by eliminating ambiguity about acceptable input formats.

Also applies to: 8778-8778, 8781-8781, 8784-8784


8784-8786: Model difference is intentional — vision model for image samples, standard model for non‑vision samples

Image-capable examples use command-a-vision-07-2025 (see src/libs/Cohere/openapi.yaml:8774–8788); non-image examples (including Go/other SDK chat/tokenize/detokenize samples) use command-a-03-2025 (e.g., src/libs/Cohere/openapi.yaml:2120–2123, 7343, 7552). No change required unless you intended a Go image example to use the vision model.


1007-1007: Confirm intended deprecations & provide migration plan

Found 9 operation-level deprecations in src/libs/Cohere/openapi.yaml:

  • POST /v1/classify
  • POST /v1/generate
  • POST /v1/summarize
  • GET /v1/connectors
  • POST /v1/connectors
  • DELETE /v1/connectors/{id}
  • GET /v1/connectors/{id}
  • PATCH /v1/connectors/{id}
  • POST /v1/connectors/{id}/oauth/authorize

Required actions:

  • Confirm these deprecations are intentional.
  • For each endpoint, state replacement (if any) and migration steps.
  • Publish a concrete deprecation timeline/sunset date and backward-compat window.
  • Update SDKs/examples/changelog/docs (examples live in this file) and ensure client libraries handle deprecation.
  • Communicate changes to users (docs, release notes, and API responses).

Comment on lines 63 to 68
items:
$ref: '#/components/schemas/ChatConnector'
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.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n"
deprecated: true
x-fern-audiences:
- public
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

🧩 Analysis chain

Verify that all deprecated operations are consistently documented.

Multiple API operations are being marked as deprecated in this file. Ensure that there's clear documentation or migration guidance for users of these deprecated endpoints.

Let me search for documentation patterns and check the consistency of deprecation markings:


🏁 Script executed:

#!/bin/bash
# Description: Verify consistency of deprecated operations and check for migration documentation

# Find all deprecated operations in the OpenAPI spec
echo "=== All deprecated operations ==="
rg -n "deprecated: true" --type yaml -A 3 -B 3

echo -e "\n=== Check for migration or replacement documentation ==="
rg -n -i "migration|replace|alternative|instead" --type yaml -C 2

echo -e "\n=== Check for consistent deprecation patterns ==="
rg -n "deprecated: true" --type yaml -A 10 | rg "description|summary" || echo "No descriptions found for deprecated operations"

Length of output: 149801


Add consistent deprecation notices and migration guidance

Verification: many deprecated: true occurrences found; a few endpoints already include migration links (Generate/Summarize/Chat v2), but numerous schema fields and response entries lack replacement/migration guidance.

  • Action: for every deprecated item add a summary-level deprecation note (e.g. "Deprecated — use ") and a link to a central migration guide or replacement API; if no replacement exists, state removal timeline or rationale.
  • Priority locations to update: src/libs/Cohere/openapi.yaml — ~lines 63–68 (ChatConnector schema), 168–171 (search_queries_only), 859–865 (playground preset id), 916–962 (prediction/confidence fields), and the deprecated response blocks around ~1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181.
  • Keep/standardize existing migration messages (e.g. generate/summarize/chat v2) so deprecation UX is uniform across the spec.

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