Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • Documentation
    • Marked several API endpoints as deprecated in the public API specification to signal future removal. Users should review usage and plan migrations to supported alternatives.
    • Deprecated two parameters: the web-search option in chat-related configuration and the search_queries_only parameter. These remain functional for now but will be removed in a future release.
    • No runtime behavior changes in this release; updates are metadata-only to guide consumers.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

The OpenAPI spec at src/libs/Cohere/openapi.yaml adds deprecated: true across numerous path operations and some path items, and marks two parameters (web-search option in ChatConnector and search_queries_only) as deprecated. No new endpoints or behaviors are introduced.

Changes

Cohort / File(s) Summary of Changes
OpenAPI deprecations
src/libs/Cohere/openapi.yaml
- Added deprecated: true to many path operations and some path items in paths.
- Marked ChatConnector’s web-search option parameter as deprecated.
- Marked search_queries_only parameter as deprecated.
- No logic or schema additions beyond deprecation metadata.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps the spec with care,
Flags of “deprecated” everywhere.
Paths grow quiet, params yawn—
Sunset now, new routes at dawn.
I twitch my nose, review complete,
Metadata trails neat and discrete. 🐇📜

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title "feat:@coderabbitai" does not summarize the actual changes; the diff updates src/libs/Cohere/openapi.yaml to mark numerous OpenAPI operations and two parameters as deprecated rather than introducing a new feature. The current title is effectively an account/handle/tag and is misleading for reviewers because it gives no context about the deprecations. This fails to communicate the primary change or intent of the PR. Rename the title to clearly state the main change, for example "chore(openapi): deprecate multiple Cohere endpoints and parameters" or "chore(cohere/openapi): mark web-search and search_queries_only as deprecated", and update the PR description to briefly note intent and planned removal timeline so reviewers understand the impact.
✅ 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_202509180631

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 06:31
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark deprecated operations and parameters in Cohere OpenAPI spec 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: 0

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

63-69: Deprecation scope likely too broad for connectors; this flags the entire parameter/property.

If the intent is to deprecate only the "web-search" connector option (as per PR summary), marking this array/property as deprecated: true will deprecate all connectors in SDKs and docs. Prefer deprecating the specific "web-search" variant within ChatConnector (e.g., a oneOf member with id: const: web-search marked deprecated: true, or a vendor extension like x-deprecated-values: ['web-search']) and keep the parent container not deprecated. If the whole connectors feature is being sunset, clarify in the description and migration notes.

Apply this local diff to avoid deprecating the entire container here:

-                  deprecated: true

Then, deprecate the "web-search" variant at the ChatConnector schema (outside this hunk), for example:

components:
  schemas:
    ChatConnector:
      oneOf:
        - type: object
          properties:
            id:
              const: web-search
          deprecated: true
          description: This connector is deprecated. Use <alternative> instead.
        - $ref: '#/components/schemas/ChatConnectorCustomOrOtherVariants'

Would you like me to draft the exact schema change once you confirm where ChatConnector is defined?


168-174: Add a machine-readable default and a migration hint for the deprecated field.

The description says “Defaults to false,” but there’s no default: false. Add it so generators and validators honor the default. Also add a brief replacement hint (e.g., which field/feature supersedes this) via description or a vendor key.

Apply this diff:

                 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"
+                  default: false
                   deprecated: true
+                  x-deprecation-reason: "Superseded by <new_field_or_behavior>."
+                  x-replacement: "<new_field_or_behavior>"
                   x-fern-audiences:
                     - public

Please confirm the actual replacement so we can fill in <new_field_or_behavior>.


1128-1134: Repeat: add per-operation deprecation notes.

Mirror the prior comment: include a clear “use X instead” note and optional x-sunset/x-replacement metadata on this operation for better DX.


1198-1204: Deprecation is fine; ensure clients won’t get surprised.

If behavior is unchanged for now, note that the endpoint remains functional until removal. Add a link to migration docs in description.


1271-1277: Ensure consistency across all methods of the same path.

If this path has multiple methods (GET/POST/etc.), verify all are consistently deprecated (or intentionally not). Inconsistencies confuse generators.

I can generate a repo scan to list any mixed-deprecation path items if you want.


1343-1349: Consider advertising the successor operation via vendor keys.

Add x-replacement: '<METHOD> <PATH or operationId>' to help SDKs and docs render precise guidance.


1421-1427: Optional: document Sunset header in responses.

If you plan to serve a Sunset HTTP header before removal, note it in the operation description and add a short example under x-fern-examples.


6623-6629: Doc hygiene: add a one-liner pointing to new API surface.

Short, actionable deprecation sentence reduces support load. Keep it consistent across all deprecated ops.

📜 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 1193d15.

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

1004-1010: Good: operation-level deprecation placed correctly. Add migration guidance and optional sunset metadata.

deprecated: true is valid at the Operation level. For consumers, include actionable guidance: add a short deprecation line to description pointing to the replacement operation/path and, optionally, a vendor x-sunset date and x-replacement to help SDKs surface better messages.

If helpful, I can sweep the file and insert a standardized “Deprecated — use …” sentence for each deprecated operation once you provide the target replacements.


1501-1507: Check for duplicated operationIds post-deprecation.

Even when deprecated, operationId must remain unique. Verify no collisions were introduced by bulk edits.

I can provide a quick script to parse and list duplicates if needed.


7178-7184: Verify deprecation placement (Parameter vs Schema).

rg shows multiple deprecated: true occurrences in src/libs/Cohere/openapi.yaml (examples: lines 63–66, 171, 862, 919, 959, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181). Ensure parameter deprecations are on the Parameter Object (sibling of name/in) and schema/field deprecations are on the Schema Object — generators like Fern treat these differently and may hide non-deprecated options if misplaced. I can provide targeted fixes per location.

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