Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • Documentation
    • Marked several API endpoints and certain 504 responses as deprecated in the public reference, improving visibility of planned deprecations.
    • Updated multi-language examples (TypeScript, Python, Java, Go, cURL) to clarify that image_url can be a base64 data URI or a web URL, with inline guidance.
  • Chores
    • Enhanced OpenAPI metadata with deprecation markers to enable SDKs and tooling to surface deprecation warnings.

Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

OpenAPI spec updated to mark multiple endpoints and some 504 Gateway Timeout responses as deprecated. Embedded multi-language examples in the same spec were edited to state that image_url may be a base64 data URI or a web URL. No functional API behavior changed.

Changes

Cohort / File(s) Summary
OpenAPI path and response deprecations
src/libs/Cohere/openapi.yaml
Added deprecated: true to numerous path items and to several referenced responses (including 504 Gateway Timeout).
Embedded example updates
src/libs/Cohere/openapi.yaml
Updated TypeScript, Python, Java, Go, and cURL snippets to note image_url accepts base64 data URIs or web URLs via inline comments.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps the spec with care,
Deprecations flagged everywhere.
“image_url,” it squeaks with glee,
“Data URI or URL—both agree!”
Docs refreshed, the paths grow old,
Hop along, the story told. 🐇✨

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 does not describe the PR's actual changes; the changeset updates src/libs/Cohere/openapi.yaml to mark many paths/responses as deprecated and adjusts sample code comments about image_url, but the title reads like a bot/mention tag and won't help reviewers understand the primary change. Please rename the PR to a concise, descriptive title such as "chore(openapi): deprecate multiple Cohere endpoints and update image_url examples" or "docs(openapi): mark endpoints deprecated; clarify image_url usage" and then re-run the pre-merge checks.
✅ 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_202509210918

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 09:19
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: deprecate endpoints/504s and update image_url examples 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: 9

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

171-171: Deprecates search_queries_only field — verify downstream SDKs.

Flagging this property as deprecated is valid at the schema level, but ensure SDKs/docs show a replacement (e.g., a new mode/flag) and that generators surface this deprecation.

Please confirm replacement guidance is present in adjacent prose or description.


8775-8787: Examples: model inconsistency and minor clarity nits.

  • Go sample uses model: "command-a-03-2025" while others use "command-a-vision-07-2025". Align to one to avoid confusion.
  • Consider adding a cURL inline comment or a brief note above the block to mirror “base64 data URI or web URL” guidance.
-            Model: "command-a-03-2025",
+            Model: "command-a-vision-07-2025",
📜 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 50b89d2.

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

66-66: Confirm intent: this deprecates the entire connectors property.

  • deprecated: true at that schema level marks the whole connectors property deprecated; if you only mean to deprecate specific connector IDs/behaviors, move that guidance into the property's description or deprecate the individual connector schema/enum members instead.
  • I ran the grep — this file already contains many other deprecated: true entries (examples: lines 171, 862, 919, 959, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181). Confirm this aligns with your overall deprecation strategy.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Operation is now fully deprecated (likely unintended if you only meant to deprecate 504).

deprecated: true at the operation level deprecates the whole endpoint, not just the 504 response. OpenAPI cannot deprecate a single response with the standard keyword.

Apply this minimal fix (remove operation deprecation here):

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true

If the goal is to discourage 504 usage, prefer one of:

  • Remove the 504 mapping from responses, or
  • Mark the component response as vendor-deprecated:

Additional change elsewhere (components section):

components:
  responses:
    GatewayTimeout:
      x-deprecated: true
      description: Gateway Timeout (deprecated; use 503 with Retry-After where applicable)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1007, the operation is marked
deprecated:true which unintentionally deprecates the entire endpoint rather than
only the 504 response; remove the operation-level deprecated:true flag on that
operation and instead either delete the 504 response entry from responses or
mark the shared 504 response in components/responses with a vendor deprecation
(e.g., add x-deprecated: true and adjust its description) so only the Gateway
Timeout response is treated as deprecated.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same issue: endpoint-wide deprecation added.

Likely should not deprecate the entire operation if intent was only about 504.

Apply same diff as above to remove deprecated: true.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1131 the operation has been marked
with deprecated: true at the operation level (endpoint-wide), but the intention
was only to mark a specific 504 response as deprecated; remove the
operation-level deprecated: true so the operation is not entirely deprecated,
and ensure only the specific response object retains any deprecation metadata if
needed—update the YAML to delete the deprecated: true key at that operation
node.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Endpoint deprecation likely unintentional.

Remove deprecated: true here unless the whole operation is being sunset.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deprecated: true
'504':
$ref: '#/components/responses/GatewayTimeout'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml at line 1201, the operation is marked with
deprecated: true likely by mistake; remove the deprecated: true entry for that
operation (or set it to false) so the endpoint is not flagged as deprecated in
the OpenAPI spec and regenerate/validate the spec to ensure no schema errors.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Endpoint marked deprecated — confirm policy/date if intentional.

If truly deprecating, include deprecation rationale/date in description and consider documenting a Sunset plan. Otherwise, remove.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1274, the endpoint is marked
deprecated but lacks any rationale or deprecation date; either confirm the
deprecation is intentional and update the endpoint's description to include the
reason, an official deprecation date and optional Sunset plan/alternative
endpoints, or remove the deprecated flag if it was set mistakenly; ensure the
description follows OpenAPI conventions (e.g., clearly labelled deprecation
rationale and date) and update any related documentation references and
changelog entries accordingly.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same: operation-level deprecation added.

Remove unless the endpoint is intentionally deprecated.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deprecated: true
'504':
$ref: '#/components/responses/GatewayTimeout'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1346 there is an operation-level
deprecation flag set; remove the operation's "deprecated: true" entry (or change
it to false) unless this endpoint is intentionally deprecated, and ensure the
operation block no longer contains the deprecated field so the endpoint is
treated as active in the OpenAPI spec.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same pattern — likely unintended full deprecation.

See earlier notes; remove here too.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deprecated: true
'504':
$ref: '#/components/responses/GatewayTimeout'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1424, there is the same unintended
full deprecation marker as noted earlier; remove the erroneous deprecation entry
at this location (e.g., delete the global or operation-level "deprecated:
true"/equivalent field) so only the intended individual parameters or properties
remain marked deprecated, and validate the OpenAPI file after removal to ensure
no other deprecated flags were accidentally applied.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same: remove operation-level deprecated.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1504, there is an operation-level
"deprecated" field; remove this operation-level deprecated flag (delete the
"deprecated: true/false" entry under the operation object) so that deprecation
is not declared at the operation level in the OpenAPI spec; if deprecation
metadata is required, use component/schema-level or response-level deprecation
instead.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same issue repeated.

Remove unless intentionally sunsetting the entire operation.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deprecated: true
'504':
$ref: '#/components/responses/GatewayTimeout'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 6626 there is a repeated operation
definition; remove this duplicate operation block (or consolidate it with the
original) unless the duplicate is intentionally kept to sunset the operation, in
which case add a clear comment and deprecation metadata. Ensure references,
operationId, and paths do not collide after removal and run the OpenAPI
linter/validator to confirm the spec remains valid.

$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Same: accidental endpoint deprecation.

Apply the same fix.

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 7181 the endpoint was accidentally
marked as deprecated; remove the unintended deprecation by deleting the
"deprecated: true" entry (or set it to "deprecated: false") for that operation,
ensure the operationId and description remain unchanged, and run OpenAPI
validation to confirm the spec is valid after the edit.

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.

1 participant