Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • Documentation
    • Updated API reference to mark deprecations: the web-search integration option for chat connectors, the search_queries_only parameter, and 504 Gateway Timeout responses on multiple endpoints.
    • Documentation-only changes; no runtime or behavior impact.
    • Aids consumers in planning migrations away from deprecated elements.
    • Existing integrations continue to work; advance notice will be provided before removals.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

OpenAPI metadata updated in src/libs/Cohere/openapi.yaml to mark specific elements as deprecated: ChatConnector web-search integration option, the search_queries_only parameter, and multiple 504 Gateway Timeout responses across nine endpoints. No functional or behavioral changes.

Changes

Cohort / File(s) Summary of changes
OpenAPI deprecations
src/libs/Cohere/openapi.yaml
Marked as deprecated: true: ChatConnector web-search integration option, search_queries_only parameter, and nine 504 Gateway Timeout responses across affected endpoints. No other edits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my ears at specs grown old,
Flags of “deprecated” quietly told—
Web-search whispers, timeouts fade,
Queries nest where notes are laid.
I stamp a paw, then hop ahead:
The map is clear, the past is shed. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is not descriptive of the actual changes; it reads like an automated mention and does not summarize the primary modification, which is adding deprecation flags to the Cohere OpenAPI spec (ChatConnector web-search, search_queries_only, and several 504 responses). As a result, the title does not give reviewers a clear sense of the change at a glance. Please replace the title with a concise, descriptive sentence that highlights the main change, for example "Deprecate ChatConnector web-search, search_queries_only, and 504 responses in Cohere openapi.yaml" or "Mark ChatConnector web-search and search_queries_only as deprecated in openapi.yaml", and add a brief PR description listing the affected endpoints so reviewers can quickly assess scope.
✅ 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_202509162118

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 16, 2025 21:19
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: deprecate web-search, search_queries_only, 504 responses Sep 16, 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: 2

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

63-69: Don’t deprecate the entire connectors field if only “web-search” is deprecated.

Placing deprecated: true here deprecates the whole connectors property in generated SDKs/docs. If the intent is to deprecate only the “web-search” ChatConnector option, remove this flag and instead:

  • Mark the specific enum value as deprecated in components/schemas/ChatConnector via a vendor extension (e.g., x-enumDeprecated or x-deprecatedValues), and
  • Call it out in the description with a timeline and alternative.

Apply (property-level) removal:

-                  deprecated: true

Then, in components/schemas/ChatConnector (not shown here), annotate only the value "web-search" as deprecated and update its description.


168-174: Good to mark search_queries_only as deprecated; add rationale/timeline.

Schema-level deprecation is valid. Add a brief “Deprecated since ; removal on ; use ” to the description to guide consumers and SDK doc generators.

Example tweak:

-                  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: "Defaults to `false`.\n\nDeprecated since 2025-09-16; will be removed in 2026‑03. Use <preferred alternative>.\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"
```<!-- review_comment_end -->

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 111c2a6d125f3d70fb1df84998691a5545fcabc8 and 8f214848cd01a02d62f368233fa48dd304b36716.

</details>

<details>
<summary>⛔ Files ignored due to path filters (21)</summary>

* `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/**`

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/libs/Cohere/openapi.yaml` (11 hunks)

</details>

<details>
<summary>⏰ 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)</summary>

* GitHub Check: Test / Build, test and publish

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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

🧩 Analysis chain

Run an OpenAPI lint/validation to catch these before merge.

Quick checks to confirm no unintended operation deprecations and that YAML stays valid.

Also applies to: 168-174, 1004-1010


🏁 Script executed:

#!/bin/bash
# Show ops that are (now) deprecated
rg -nC2 '^\s*deprecated:\s*true\s*$' src/libs/Cohere/openapi.yaml

# List endpoints that still list a 504 response
rg -nC2 "^[[:space:]]*'504':[[:space:]]*$" src/libs/Cohere/openapi.yaml

# Optional: if Redocly CLI is available locally
# npx @redocly/cli@latest lint src/libs/Cohere/openapi.yaml

Length of output: 9102


Run an OpenAPI linter and remove/clarify deprecated fields and 504 responses.

Ran the grep checks — the spec contains multiple deprecated: true entries (e.g. lines ~64–66, 169–173, 860–863, 917–921, 957–961, 1005–1008, 6624–6627, 7179–7182) and many endpoints still list a '504' GatewayTimeout response (e.g. 277–281, 1003–1007, 1127–1131, 1197–1201, 1270–1274, 6622–6626, 7177–7181, 12243–12247). Run a linter (Redocly CLI or Spectral) and:

  • Remove or properly mark deprecated fields (or document replacement) where deprecated: true is present.
  • Remove/update '504' GatewayTimeout responses where no longer applicable and validate the YAML.

Suggested command: npx @redocly/cli@latest lint src/libs/Cohere/openapi.yaml

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 63–69 (and other occurrences at
~64–66, 169–173, 860–863, 917–921, 957–961, 1005–1008, 6624–6627, 7179–7182)
there are fields marked deprecated: true and across the spec there are endpoints
still declaring a 504 GatewayTimeout response (examples near lines 277–281,
1003–1007, 1127–1131, 1197–1201, 1270–1274, 6622–6626, 7177–7181, 12243–12247);
run an OpenAPI linter (npx @redocly/cli@latest lint src/libs/Cohere/openapi.yaml
or Spectral), then for each deprecated: true either remove the field or add
documentation pointing to the replacement field and update the description to
indicate deprecation and planned removal, and remove or replace 504 response
entries where they are not applicable (or add a clear rationale if kept), fixing
any YAML validation errors the linter reports and re-run until the spec is
clean.

Comment on lines 1004 to 1010
$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
x-fern-audiences:
- public
x-fern-examples:
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-level deprecation accidentally applied; this deprecates entire endpoints.

Placing deprecated: true at this position marks the whole operation deprecated (OpenAPI Operation Object), not just the 504 response. Response objects don’t support deprecated. Result: SDKs and docs will flag these endpoints as deprecated.

Fix: remove deprecated: true here. If 504 is no longer returned, drop the 504 mapping entirely. If you must keep it, consider an inline response with a note or a vendor extension under the response (not alongside a $ref).

Apply for each occurrence (example block):

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

Optional (if keeping a marker without deprecating the op):

-      '504':
-        $ref: '#/components/responses/GatewayTimeout'
+      '504':
+        description: "Deprecated: this endpoint no longer returns 504."
+        content: {}

Note: Avoid siblings next to $ref; many tools ignore or reject extensions alongside $ref.

Also applies to: 1128-1134, 1198-1204, 1271-1277, 1343-1349, 1421-1427, 1501-1507, 6623-6629, 7178-7184

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1004-1010 (and also at 1128-1134,
1198-1204, 1271-1277, 1343-1349, 1421-1427, 1501-1507, 6623-6629, 7178-7184),
remove the misplaced "deprecated: true" that is placed at the operation level
next to the 504 response $ref (which deprecates the whole endpoint); if the 504
response is no longer returned, delete the 504 response mapping entirely; if you
must keep a note about 504, replace the $ref sibling with either an inline
response object containing the note or use a vendor extension under the response
(not adjacent to $ref) so the operation is not marked deprecated.

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