-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:OpenAPI: deprecate web-search, search_queries_only, 504 responses #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughOpenAPI 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this 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: trueThen, 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 -->
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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.yamlLength 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.
| $ref: '#/components/responses/ServiceUnavailable' | ||
| '504': | ||
| $ref: '#/components/responses/GatewayTimeout' | ||
| deprecated: true | ||
| x-fern-audiences: | ||
| - public | ||
| x-fern-examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: trueOptional (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.
Summary by CodeRabbit