-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Mark operations as deprecated in src/libs/Cohere/openapi.yaml #278
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
WalkthroughAdds 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ 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: 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
⛔ Files ignored due to path filters (21)
src/libs/Cohere/Generated/Cohere.CohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.csis 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 hereswagger-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/testsMarking 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).
| 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.
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.
| 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.
Summary by CodeRabbit