Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • Documentation
    • Added deprecation notices to multiple Cohere API endpoints and parameters in the OpenAPI spec, including search_queries_only and a ChatConnector-related parameter.
    • Marked nine operations as deprecated at the operation level to surface clearer guidance in API docs.
    • These updates enable deprecation warnings in documentation, client generation, and tooling to aid migration planning.
    • No runtime behavior changes; existing integrations continue to function.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Marked specific parameters and nine operations as deprecated within the Cohere OpenAPI specification. Changes are limited to metadata in src/libs/Cohere/openapi.yaml, adding deprecated: true to a ChatConnector-related parameter, the search_queries_only parameter, and several operation declarations.

Changes

Cohort / File(s) Change summary
OpenAPI deprecation metadata
src/libs/Cohere/openapi.yaml
Added deprecated: true to a parameter describing ChatConnector items; marked boolean parameter search_queries_only as deprecated; added deprecated: true to nine operations following their 504 responses; no behavioral changes, metadata-only updates to public API declarations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my whiskers at the YAML moon,
Marking elders “deprecated” with a tidy rune.
No code to hop, no logic to chase—
Just gentle tags in their rightful place.
A carrot for clarity, a thumbs-up for scope—
Metadata trimmed, we bound with hope. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is not a clear, descriptive summary of the changes in this PR; it reads like a bot tag rather than a concise statement of the main change. The actual changes add deprecation metadata to parameters and multiple operations in src/libs/Cohere/openapi.yaml, which the title does not convey. As written, the title would not help a reviewer or future reader quickly understand the PR's primary intent. Rename the PR to a short, specific title such as "Deprecate multiple Cohere OpenAPI operations and search_queries_only parameter" and update the description to list the affected file(s) and key deprecations so reviewers can immediately see the intent and 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_202509161242

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 12:43
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate parameters and nine operations in Cohere OpenAPI 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: 0

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

63-69: Parameter-level deprecation looks correct; confirm intent vs. item/schema-level.

Placing deprecated: true at the parameter level deprecates the entire parameter, not specific connector items. If the goal was to deprecate only certain connector values, OpenAPI lacks first-class per-enum/value deprecation; consider documenting replacements in the parameter description.

Optionally switch the long escaped description to a YAML block scalar for readability.


1004-1010: Operation marked deprecated; add rationale/replacement pointer.

Consider adding a brief deprecation reason and link to the replacement operation in description or an x-deprecation-reason vendor field for better DX.


1128-1134: Same here—operation-level deprecation is fine.

Add a short “Use X instead” note to help consumers migrate.


1198-1204: Consistent deprecation metadata.

Looks good; ensure tags/summary in docs flag this as deprecated.


1271-1277: Deprecation status applied.

No structural issues spotted. Optional: include a deprecation timeline (e.g., Sunset date) via vendor extension.


1343-1349: OK; consider example hygiene.

If x-fern-examples still show usage, add a note that the endpoint is deprecated to discourage new adoption.


7178-7184: Final operation deprecation looks consistent.

No further issues. If you have a public changelog, add these deprecations with target removal dates.

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

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

168-174: Schema property deprecation is valid; ensure downstream SDKs reflect it.

Marking search_queries_only as deprecated at the schema/property level is valid in OAS3. Ensure codegen (e.g., Fern/SDKs) surfaces this as deprecation notices.


1421-1427: LGTM; keep audiences consistent.

x-fern-audiences: [public] with deprecated: true is acceptable.


1501-1507: LGTM; verify no stray, similar operations remain unmarked.

Run a quick grep to ensure all intended operations were updated.


6623-6629: Validate OpenAPI spec and re-run deprecation scan — previous script failed (ModuleNotFoundError: openapi_spec_validator)

The earlier validation aborted because openapi_spec_validator is missing. Re-run validation for src/libs/Cohere/openapi.yaml using one of the options below.

Option A — install and run full OpenAPI v3 validator:

#!/bin/bash
set -euo pipefail

python -m pip install --user openapi-spec-validator PyYAML
python - <<'PY'
import yaml,sys
from openapi_spec_validator import validate_v3_spec
spec_path = "src/libs/Cohere/openapi.yaml"
with open(spec_path, "r", encoding="utf-8") as f:
    spec = yaml.safe_load(f)
validate_v3_spec(spec)
print("OpenAPI validation: OK")
PY

Option B — quick checks without installing the validator (YAML parse + schema presence + list deprecated entries):

#!/bin/bash
set -euo pipefail

python - <<'PY'
import yaml,sys
spec_path = "src/libs/Cohere/openapi.yaml"
try:
    yaml.safe_load(open(spec_path,"r",encoding="utf-8"))
    print("YAML parse: OK")
except Exception as e:
    print("YAML parse failed:", e)
    sys.exit(1)
PY

rg -nP '^\s*ChatConnector\s*:' src/libs/Cohere/openapi.yaml -C2 || { echo "Missing ChatConnector schema definition?" >&2; exit 1; }

echo "Deprecated entries:"
rg -n '^\s*deprecated:\s*true\s*$' src/libs/Cohere/openapi.yaml -n -C1 || true

If this runs in CI, add openapi-spec-validator to the test/dependency list so validation is reproducible in automation.

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