Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • Documentation
    • Updated API reference to mark several parameters and multiple endpoints as deprecated.
    • Includes deprecation of certain chat-connector-related options and a boolean controlling search query behavior.
    • Deprecation flags appear across various operations, including those with Gateway Timeout responses.
    • No runtime behavior changes; updates are limited to deprecation metadata in the public API specification.

Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

OpenAPI spec updates in src/libs/Cohere/openapi.yaml add deprecated: true to specific parameters and several path operations. The marked parameters include a ChatConnector-related parameter and search_queries_only. Multiple endpoints now carry deprecation flags near 504 Gateway Timeout response sections. No implementation logic changed.

Changes

Cohort / File(s) Summary of Changes
OpenAPI deprecation flags — parameters
src/libs/Cohere/openapi.yaml
Added deprecated: true to a ChatConnector-related parameter object (items referencing ChatConnector) and to the boolean parameter search_queries_only.
OpenAPI deprecation flags — operations
src/libs/Cohere/openapi.yaml
Inserted deprecated: true on multiple path operations, alongside 504/GatewayTimeout response blocks across numerous endpoints (9+ occurrences).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I thump my paws with gentle cheer,
Deprecated paths grow faint, less clear.
A toggle here, a flag proclaimed,
The map is marked, the routes are named.
I hop ahead through specs so bright—
New trails await by moonlit byte. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The provided title "feat:@coderabbitai" is vague and does not describe the main change in the diff, which updates src/libs/Cohere/openapi.yaml to mark multiple API endpoints and parameters as deprecated; because it conveys no meaningful information about the PR's intent, the title check is inconclusive. Please replace the title with a concise, descriptive summary of the change, for example "chore(openapi): mark deprecated endpoints and parameters in src/libs/Cohere/openapi.yaml" or "docs: deprecate ChatConnector and search_queries_only in Cohere OpenAPI spec" so reviewers can quickly understand the PR's purpose.
✅ 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_202509161522

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 15:23
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark parameters and endpoints as deprecated in Cohere OpenAPI spec 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: 1

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

1128-1134: Deprecation is consistent; add human-visible cue.

Consider prefixing the operation summary with “[DEPRECATED]” so rendered docs make this obvious.


1198-1204: Add deprecation rationale/replacement.

Recommend adding a one-line note in the operation description pointing to the successor endpoint.


1343-1349: OK to deprecate; consider HTTP Deprecation/Sunset headers in runtime.

If you own the server, emitting Deprecation and Sunset headers helps clients programmatically react.


1421-1427: Doc examples may need updates.

If x-fern-examples reference this operation, ensure examples are updated or moved to the replacement.

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

⛔ 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 (6)
src/libs/Cohere/openapi.yaml (6)

1501-1507: Deprecation OK; cross-reference SDKs.

Verify language SDKs generated from this spec will carry the deprecation annotation (e.g., @deprecated tags).


6623-6629: Large spec section — no accidental path-level deprecation found.

All deprecated: true occurrences in src/libs/Cohere/openapi.yaml are on Operation Objects or inside components/schemas/properties; no Path Item-level deprecated keys detected.


63-69: Confirm deprecation scope for connectors — param deprecated but connectors API & ChatConnector type still present

ChatRequest.connectors is marked deprecated (src/libs/Cohere/openapi.yaml:60–66; src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs:34–36), but connector endpoints and the ChatConnector schema remain defined (openapi.yaml /v1/connectors ≈ 1075–1226; components/schemas/ChatConnector ≈ 12545–12574) and examples/code samples still reference connectors (openapi.yaml:232–302, 528–541).

  • If the entire connectors feature is being retired: mark components/schemas/ChatConnector deprecated, add a short replacement pointer in its description, add metadata (e.g., x-sunset, x-replaced-by), and update/remove examples and generated models that reference connectors.
  • If only the ChatRequest parameter is deprecated: add an explicit note in the ChatRequest/connectors description and examples clarifying that the connectors API and ChatConnector schema remain supported and document the recommended alternative workflow.

1004-1010: Deprecated markers are operation-level (sibling to responses) — no change required. Quick rg of src/libs/Cohere/openapi.yaml shows many 'deprecated: true' matches (e.g., lines 1007, 1131, 1202, 1275, 1346) with indentation consistent with operation-level placement; run an OpenAPI linter/validator for full-file validation.


7178-7184: Final deprecation hunk looks consistent — spec validated
openapi: 3.0.4 found at src/libs/Cohere/openapi.yaml:1 — basic schema-version check passes; no structural concerns.


1271-1277: Streaming/non‑streaming parity — deprecations are inconsistent

v1/generate is marked as Legacy (migration note; ~lines 6450–6711) and many /v1/* endpoints are flagged deprecated (e.g. connectors block with deprecated: true around ~lines 1258–1285), but /v1/chat (~line 18) is not marked deprecated while /v2/chat (~line 7381) is the current streaming API. The schema also exposes both NonStreamedChatResponse and StreamedChatResponse (oneOf around ~lines 253–257). Deprecate the matching sync/stream variants together or add explicit migration notes for the un‑deprecated partner to avoid client drift.

Comment on lines 168 to 174
search_queries_only:
type: boolean
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"
deprecated: true
x-fern-audiences:
- public
seed:
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

Deprecate with guidance and timeline.

search_queries_only is now deprecated. Add 1–2 sentences in the description indicating the alternative and any removal date to prevent client confusion. Ensure generated SDKs surface this deprecation clearly.

Use this to check for docs/summary updates mentioning the alternative:


🏁 Script executed:

#!/bin/bash
rg -nC3 'search_queries_only' src

Length of output: 1749


Add deprecation guidance and removal timeline for search_queries_only

openapi.yaml marks search_queries_only as deprecated but its description has no alternative or removal date; the generated C# property is marked Obsolete with a generic message. Add 1–2 sentences to the OpenAPI property description naming the recommended alternative (if any) and a planned removal date, then regenerate SDKs so the deprecation (replacement + removal date) appears in generated docs/attributes.

  • src/libs/Cohere/openapi.yaml (≈lines 168–171): extend the property description with alternative + removal date.
  • src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs (≈lines 199–201): ensure Obsolete/XML-docs include the replacement and removal date after regeneration.

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.

1 participant