Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • Documentation

    • Marked several API endpoints and specific responses as deprecated in the public API specification to signal upcoming retirement.
    • Refreshed language-specific examples (JavaScript, Python, Go, Java) to clarify that image_url can be a base64 data URI or a web URL, and removed outdated samples.
  • Chores

    • Updated API schema metadata to include deprecation flags; no change to current runtime behavior.

@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

Added deprecated: true flags to multiple OpenAPI paths/responses and updated example code blocks in src/libs/Cohere/openapi.yaml to clarify that image_url inputs can be base64 data URIs or web URLs. One JS sample block was removed/replaced. No runtime logic changes.

Changes

Cohort / File(s) Summary
OpenAPI deprecations
src/libs/Cohere/openapi.yaml
Marked numerous endpoints/responses as deprecated by adding deprecated: true across relevant path components and response sections.
Example snippet updates
src/libs/Cohere/openapi.yaml
Revised example code blocks (JS, Go, Python, Java) adding comments that image_url may be a base64 data URI or a web URL; replaced one JS block with updated multi-language samples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

In yaml fields I softly tread,
Marking paths as “soon to bed.”
Samples whisper, clear and bright—
“Data URI or web’s delight!”
A rabbit stamps the spec with cheer,
Deprecations noted, crystal clear.
Hop, commit, and disappear. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is vague and appears to be a bot/handle tag rather than a concise description of the changes; it does not summarize the PR's primary modifications (which are OpenAPI deprecation flags and clarifications to example code). Because it fails to communicate the main change to a reviewer scanning history, the title check is inconclusive. Rename the PR to a short, clear single-sentence summary of the primary change; for example: "openapi: mark multiple Cohere endpoints deprecated and clarify image_url usage in examples" or "docs(openapi): deprecate endpoints and clarify image_url sample comments". After updating the title, re-run the check.
✅ 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_202509212116

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 21, 2025 21:17
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add deprecated flags and update image_url examples in Cohere OpenAPI Sep 21, 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 (11)
src/libs/Cohere/openapi.yaml (11)

63-69: Add explicit deprecation guidance for connectors.

Marking the property as deprecated is good. Please also add a developer‑visible message and a migration path so SDKs/docs surface it clearly.

Apply a vendor extension right next to deprecated: true:

   description: "...(existing)..."
   deprecated: true
+  x-deprecationMessage: "Deprecated: replace `connectors` with <new field/flow>. This field will be removed on <date>."
   x-fern-audiences:

168-174: Deprecate with replacement and timeline for search_queries_only.

Same ask here: add an explicit deprecation message and successor field/behavior.

   description: "...(existing)..."
   deprecated: true
+  x-deprecationMessage: "Deprecated: use <replacement flag/endpoint>. Sunset on <date>."
   x-fern-audiences:

1004-1010: Operation-level deprecation needs migration notes.

Setting deprecated: true is valid on operations. Add a short note pointing to the replacement operation and (optionally) a sunset date so generators and docs can surface the path forward.

 responses:
   '504':
     $ref: '#/components/responses/GatewayTimeout'
 deprecated: true
+x-deprecationMessage: "This endpoint is deprecated. Migrate to <new operationId/path> by <date>."
 x-fern-audiences:

1128-1134: Same deprecation messaging gap as above.

 deprecated: true
+x-deprecationMessage: "This endpoint is deprecated. Use <replacement>."
 x-fern-audiences:

1198-1204: Surface replacement in docs/SDKs for this deprecated operation.

 deprecated: true
+x-deprecationMessage: "Deprecated: see <replacement>."
 x-fern-audiences:

1271-1277: Repeatable: add x-deprecationMessage.

 deprecated: true
+x-deprecationMessage: "Deprecated: migrate to <replacement>."
 x-fern-audiences:

1343-1349: Include migration path for consumers.

 deprecated: true
+x-deprecationMessage: "Use <replacement>. Sunset <date>."
 x-fern-audiences:

1421-1427: Deprecation without alternative will confuse users.

 deprecated: true
+x-deprecationMessage: "Replaced by <replacement>."
 x-fern-audiences:

1501-1507: Add deprecation message (consistent with other ops).

 deprecated: true
+x-deprecationMessage: "Deprecated endpoint. See <replacement>."
 x-fern-audiences:

6623-6629: Operation deprecation: provide guidance + (optional) removal date.

 deprecated: true
+x-deprecationMessage: "Deprecated; removal planned <date>. Migrate to <replacement>."
 x-fern-audiences:

7178-7184: Same as above: add x-deprecationMessage.

 deprecated: true
+x-deprecationMessage: "Use <replacement>."
 x-fern-audiences:
📜 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 7a05975.

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

8772-8787: Example consistency and minor fixes.

  • Inconsistent model names: Go uses "command-a-03-2025" while others use "command-a-vision-07-2025". Align or explain.
  • cURL Authorization scheme casing: prefer "Bearer" for consistency.
  • API key handling: TS/Python snippets instantiate clients without showing token; verify SDKs auto-read env vars; if not, add token examples.
  • Detail parameter: Java example omits detail: "auto" while others include it; consider adding for parity.

Minimal diffs for two clear fixes:

-  --header "Authorization: bearer $CO_API_KEY" \
+  --header "Authorization: Bearer $CO_API_KEY" \
-            Model: "command-a-03-2025",
+            Model: "command-a-vision-07-2025",

If SDKs do not auto-read env vars, update TS/Python snippets, e.g.:

-const cohere = new CohereClientV2({});
+const cohere = new CohereClientV2({ token: process.env.COHERE_API_KEY });
-co = cohere.ClientV2()
+co = cohere.ClientV2(api_key=os.environ["CO_API_KEY"])

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