Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • Documentation
    • Updated API reference to mark several endpoints as deprecated.
    • Added deprecation notices for operations related to the web-search ChatConnector and the search_queries_only flag.
    • Applied deprecation flags across nine additional endpoints (including those returning ServiceUnavailable and GatewayTimeout), clarifying their status in the docs and generated client SDKs.
    • Improves visibility of upcoming removals so developers can plan migrations.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Adds deprecated: true to multiple operation objects in src/libs/Cohere/openapi.yaml. This includes the web-search ChatConnector-related operation, the search_queries_only flag operation, and nine additional endpoints associated with ServiceUnavailable/GatewayTimeout responses. No schemas or response structures are otherwise changed.

Changes

Cohort / File(s) Summary
OpenAPI deprecations
src/libs/Cohere/openapi.yaml
Added deprecated: true to several operations, including those referencing web-search ChatConnector and search_queries_only, plus nine more endpoints; no schema modifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A whisk of ears, I stamp the ground—
Old paths flagged, their time now wound.
Deprecated burrows, clearly signed,
So seekers know what’s left behind.
I hop ahead where fresh routes bloom,
Mapping trails beyond the gloom.
(\_/) onward, tidy docs—ka-boom!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The changes in this PR add deprecated: true flags to multiple operations in src/libs/Cohere/openapi.yaml, but the title "feat:@coderabbitai" is a short tag/mention that does not describe the actual changes and therefore does not summarize the main change or help a reviewer quickly understand the purpose of the PR. It is not a clear, single-sentence summary and would be confusing when scanning project history. For those reasons the title does not meet the guideline of being concise and specific to the changeset. Rename the PR to a concise, descriptive title such as "chore(cohere): mark several OpenAPI endpoints as deprecated" or "feat: deprecate specified Cohere OpenAPI operations in src/libs/Cohere/openapi.yaml" and keep endpoint details in the description; update the title before merging so it accurately reflects the primary 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_202509181830

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 18:31
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark operations as deprecated in src/libs/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 (1)
src/libs/Cohere/openapi.yaml (1)

1128-1134: Consider adding a deprecation timeline.

Optionally add x-sunset (date) and a short note (e.g., x-deprecation-reason) to help SDKs/docs surface a clear migration path.

Example:

   deprecated: true
+  x-sunset: '2025-12-31'
+  x-deprecation-reason: 'Superseded by /v2/chat/completions with connectors_v2.'
📜 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 33a89be.

⛔ 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
🔇 Additional comments (9)
src/libs/Cohere/openapi.yaml (9)

1198-1204: LGTM — consistent operation-level deprecation.


1271-1277: LGTM — consistent operation-level deprecation.


1343-1349: LGTM — consistent operation-level deprecation.


1421-1427: LGTM — consistent operation-level deprecation.


1501-1507: LGTM — consistent operation-level deprecation.


6623-6629: LGTM — consistent operation-level deprecation.


7178-7184: LGTM — consistent operation-level deprecation.


1004-1010: Validate OpenAPI 'deprecated' placement — validator not available here

swagger-cli / spectral are not installed in the environment; run locally: swagger-cli validate src/libs/Cohere/openapi.yaml || spectral lint src/libs/Cohere/openapi.yaml. Confirm the "deprecated" field is inside the Operation object (after responses) and fix any indentation/structure errors. Location: src/libs/Cohere/openapi.yaml lines 1004–1010.


168-174: Deprecation OK — verify callers/tests

Marking search_queries_only as deprecated at the schema level is valid; ensure callers/tests stop using it or are gated. I couldn't confirm downstream references because ripgrep returned "No files were searched" — run locally: rg -nP -C2 '\bsearch_queries_only\b' --hidden -S --glob '!/dist/' --glob '!/build/'. File: src/libs/Cohere/openapi.yaml (lines 168-174).

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.

⚠️ Potential issue

Misplaced deprecation/description under items — move to the property level.

Right now, both description and deprecated sit under items, which marks/decribes the array elements, not the connectors property. This likely miscommunicates intent to tooling and SDKs.

Apply this diff to lift them to the property schema:

 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
+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
📝 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:
$ref: '#/components/schemas/ChatConnector'
x-fern-audiences:
- public
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
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 63 to 69, the description and
deprecated fields are currently nested under the items schema (thus describing
array elements) but should describe the connectors property itself; move the
description and deprecated keys out of the items block up one level so they are
direct children of the connectors property schema (leave items as the element
schema only), ensuring the connectors property has its own description and
deprecated flag while items continues to define the array element type.

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