Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • Documentation
    • Marked select API operations as deprecated, including the ChatConnector variant with web search and the search_queries_only endpoint.
    • Added deprecation metadata to 504 Gateway Timeout and related Service Unavailable response mappings across multiple endpoints.
    • Updated API contract to clearly signal upcoming deprecations without changing runtime behavior or error handling.
  • Chores
    • Refreshed OpenAPI metadata to improve deprecation visibility for integrators and tooling.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

OpenAPI spec at src/libs/Cohere/openapi.yaml was updated to mark specific operations and several 504/ServiceUnavailable response mappings as deprecated. Flags were added to the ChatConnector web-search operation, the search_queries_only operation, and multiple GatewayTimeout-related responses. No runtime code or logic changes are included.

Changes

Cohort / File(s) Summary
OpenAPI deprecation metadata
src/libs/Cohere/openapi.yaml
Added deprecated: true to two operations (ChatConnector web-search, search_queries_only) and to multiple 504 GatewayTimeout/ServiceUnavailable response mappings across various endpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my whiskers at YAML lines,
Tagging “deprecated” in tidy signs.
No code to run, no tests to chase—
Just maps and flags in proper place.
Thump-thump! says the doc-wise hare,
Clean paths marked with metadata care. 🐇✨

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 PR's actual changes, which are metadata deprecations added to operations and 504/ServiceUnavailable responses in src/libs/Cohere/openapi.yaml; it reads like a bot/author tag and gives reviewers no clear summary of the change. This makes the PR title misleading and insufficient for scanning history. Change the title to a concise, descriptive summary of the change, for example: "chore(openapi): deprecate ChatConnector and search_queries_only ops and related 504 responses in src/libs/Cohere/openapi.yaml" or the shorter "chore(openapi): mark multiple endpoints as deprecated". Include the scope (openapi/Cohere) and the word "deprecate" so the primary 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_202509181242

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 18, 2025 12:43
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate ops and 504/ServiceUnavailable in Cohere openapi.yaml Sep 18, 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 (10)
src/libs/Cohere/openapi.yaml (10)

168-174: Property deprecation: add migration guidance and sunset metadata.

search_queries_only is now deprecated. Add a short note pointing to the replacement flag/flow, and consider an x-sunset or x-deprecation extension with a date and link to migration docs to aid SDK consumers. (redocly.com)


1004-1010: Operation deprecation: ensure placement is at Operation level.

deprecated: true must be a sibling of responses on the Operation Object, not within a Response. Please verify indentation so linters treat it as the operation’s flag. Also add a brief deprecation reason/alternative in the operation description. (redocly.com)


1128-1134: Same as above: verify deprecated is on the Operation, not the Response block.

Keep indentation consistent and consider adding a short “Use X instead” note in description. (redocly.com)


1198-1204: Confirm op-level deprecation and add rationale.

Lint placement and add guidance to reduce client confusion. (redocly.com)


1271-1277: Repeat check: op-level deprecated placement.

As above; verify indentation and add a migration hint in description. (redocly.com)


1343-1349: Repeat check across endpoints.

Ensure lint-valid placement and add a deprecation note for consumers. (redocly.com)


1421-1427: Repeat check across endpoints.

Confirm op-level placement; add a short “replacement API” pointer. (redocly.com)


1501-1507: Repeat check across endpoints.

Same validation and doc guidance as previous hunks. (redocly.com)


6623-6629: Repeat check across endpoints.

Operation-level deprecated placement + add rationale. (redocly.com)


7178-7184: Repeat check across endpoints.

Operation-level deprecated placement + brief alternative. (redocly.com)

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

⛔ 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 (11 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

Comment on lines 63 to 69
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
conversation_id:
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

Deprecation on $ref’d items: confirm OAS 3.1 or wrap with allOf.

You’re adding deprecated: true alongside a $ref under a Schema items. This is valid only if the spec is OpenAPI 3.1 (schema $ref can have siblings). If the file is still OpenAPI 3.0.x, siblings to $ref in Schema Objects are not allowed and many tools will ignore them. Either upgrade to 3.1 or wrap with allOf. Also, deprecating the items schema deprecates the entire ChatConnector item type—verify that’s the intent (vs. deprecating only the "web-search" connector id). (github.com)

Apply if staying on OAS 3.0.x:

-                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
+                items:
+                  allOf:
+                    - $ref: '#/components/schemas/ChatConnector'
+                    - deprecated: true
+                  description: "Accepts `{\"id\": \"web-search\"}` ... (context unchanged)"

Quick check script:


🏁 Script executed:

#!/bin/bash
# Show declared OpenAPI version and highlight $ref siblings under items
head -n 5 src/libs/Cohere/openapi.yaml | rg -n '^openapi:'
rg -nA3 -B2 $'items:\\s*$' src/libs/Cohere/openapi.yaml | rg -nA3 -B0 '\\$ref|deprecated|description'

Length of output: 16938


Deprecation on $ref’d items: file declares OpenAPI 3.0.4 — wrap with allOf or upgrade to 3.1.

openapi: 3.0.4 and the items block in src/libs/Cohere/openapi.yaml contains a $ref plus description and deprecated: true — OAS 3.0.x forbids siblings to $ref. Either upgrade to 3.1 or wrap the $ref in allOf. Also confirm you intend to deprecate the entire ChatConnector schema (not only the "web-search" connector id).

Apply if staying on OAS 3.0.x:

-                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
+                items:
+                  allOf:
+                    - $ref: '#/components/schemas/ChatConnector'
+                    - deprecated: true
+                  description: "Accepts `{\"id\": \"web-search\"}` ... (context unchanged)"
📝 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
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
conversation_id:
items:
allOf:
- $ref: '#/components/schemas/ChatConnector'
- deprecated: true
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"

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