Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • Documentation

    • Updated API documentation to mark several legacy endpoints as deprecated.
    • Marked the parameter for connector IDs as deprecated.
    • Marked the search_queries_only parameter as deprecated.
    • No changes to response formats or schemas.
  • Chores

    • Added deprecation metadata across affected API operations and parameters to improve clarity for integrators.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Deprecation metadata was added in src/libs/Cohere/openapi.yaml: two parameters were marked deprecated and several operations were marked deprecated. No schema or response shape changes were introduced.

Changes

Cohort / File(s) Summary
Parameter deprecations
src/libs/Cohere/openapi.yaml
Marked the array parameter for ChatConnector IDs (items: $ref to components/schemas/ChatConnector) as deprecated: true. Marked the boolean parameter search_queries_only as deprecated: true.
Operation deprecations
src/libs/Cohere/openapi.yaml
Set deprecated: true on multiple operations (those previously listing 504 GatewayTimeout responses). No other operation shapes changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my whiskers at the spec’s new lore,
Flags of “deprecated” posted at the door.
No schemas changed, just signs to heed—
A carrot-colored roadmap for what not to read.
I hop along, ears high, quite elated—
Future-proof paths now clearly annotated. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is terse and references a username/bot rather than describing the actual change; it does not communicate the primary modification in this branch. The changeset updates src/libs/Cohere/openapi.yaml to mark certain parameters (e.g., ChatConnector IDs and search_queries_only) and several operations as deprecated, which the title fails to indicate. Because the title is vague and non-descriptive, it is inconclusive whether it accurately represents the main change or will be useful for reviewers and project history. Please rename the PR to a concise, descriptive title that highlights the main change; for example: "chore(cohere/openapi): mark parameters and operations as deprecated" or "feat(openapi): deprecate ChatConnector IDs and search_queries_only". Use a conventional prefix and explicit scope, avoid usernames or emojis, and keep the title short so reviewers and future readers immediately understand the purpose. Update the title before merging.
✅ 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_202509160922

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 09:23
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark deprecated parameters and operations 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 (7)
src/libs/Cohere/openapi.yaml (7)

63-69: Schema-level deprecation is valid; add rationale and replacement.

Marking this property deprecated is fine. Add an explicit deprecation note and replacement pointer so SDK docs and portal show actionable guidance, and optionally a sunset date via a vendor extension.

Apply near this node:

                   description: "Accepts {\"id\": \"web-search\"} ..."
                   deprecated: true
+                  x-deprecation-reason: "Replaced by 'tools' array with 'web-search' tool configuration."
+                  x-sunset: "2025-12-31"

1007-1010: Operation deprecated; include migration breadcrumb.

Add an explicit “use X instead” to the operation description or via an extension so client portals render migration paths.

       deprecated: true
+      x-deprecation-replaced-by: "/v2/messages.create"

1201-1204: Consider adding a planned removal date.

Helps downstreams plan. Keep dates in UTC ISO-8601.

       deprecated: true
+      x-sunset: "2026-03-31"

1274-1277: Deprecation without tags can bury the endpoint.

If not already present elsewhere, add a short sentence in the operation description pointing to the successor.


1424-1427: If 504 is the only differentiator, consider removing it when deprecated.

Not blocking, but trimming responses on deprecated ops can reduce support surface.


1504-1507: Documentation nudge.

Add a single, consistent deprecation paragraph template to keep portal text uniform.


7181-7184: Final pass LGTM with minor polish.

Changes are correct; add replacement/sunset metadata when available.

📜 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 45008ee.

⛔ 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)

6626-6629: Verify deprecated operations don't require parameters

Automated check returned no matches; confirm src/libs/Cohere/openapi.yaml contains no operations with "deprecated: true" that still define parameters with "required: true". Run locally:

python - <<'PY'
import yaml
o = yaml.safe_load(open('src/libs/Cohere/openapi.yaml'))
for path, methods in o.get('paths', {}).items():
  for method, op in (methods or {}).items():
    if isinstance(op, dict) and op.get('deprecated') is True:
      for p in op.get('parameters', []):
        if p.get('required') is True:
          print(path, method, p.get('name'))
PY

If any are found, mark the parameter schema deprecated or remove/set required: false.


1346-1349: Check SDK generation impact — deprecated ops present in OpenAPI

src/libs/Cohere/openapi.yaml marks these operationIds as deprecated: chat, classify, list-connectors, create-connector, delete-connector, get-connector, update-connector, oAuthAuthorize-connector, generate, summarize. A ripgrep run skipped files and returned no matches, so usages could not be confirmed. Confirm SDK generation and tests: ensure SDKs still compile and no tests/imports reference these operations; if your generator hides deprecated ops by default, regenerate SDKs or update code/tests accordingly.


168-174: ```shell
#!/bin/bash
set -euo pipefail

echo "PWD: $(pwd)"
echo "Top-level files:"
ls -la || true

echo
echo "Is this a git repo?"
git rev-parse --is-inside-work-tree 2>/dev/null || echo "Not a git repo"

echo
echo "Sample file list (up to 200 entries):"
find . -maxdepth 3 -type f | sed -n '1,200p' || true

echo
echo "Running ripgrep (debug) to find occurrences of possible deprecated flags/keys..."
rg --debug -n --no-heading -C1 -uu --hidden -S -g '!.git'
-e '\bsearch_queries_only\b'
-e '"search_queries_only"\s*:'
-e '\bsearch-queries\b'
-e '\bsearch-queries-only\b'
-e '"search-queries"\s*'
-e '"search-queries-only"\s*' || echo "rg finished (no matches or non-zero exit)."


</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +1131 to 1134
deprecated: true
x-fern-audiences:
- public
x-fern-examples:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Repeat deprecation metadata pattern consistently.

Ensure each deprecated operation declares a replacement (or “none”) to avoid ambiguous docs.


🏁 Script executed:

#!/bin/bash
rg -nP -C2 'deprecated:\s*true' src/libs/Cohere/openapi.yaml | rg -nC0 -v 'x-deprecation-replaced-by'

Length of output: 3617


Add x-deprecation-replaced-by to all deprecated operations (or set to "none")
14 deprecated entries in src/libs/Cohere/openapi.yaml are missing x-deprecation-replaced-by; add the replacement key (or "none") for each to avoid ambiguous docs.
Locations: src/libs/Cohere/openapi.yaml — lines 66, 171, 862, 919, 959, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1131 to 1134 (and for the other
deprecated entries at lines 66, 171, 862, 919, 959, 1007, 1201, 1274, 1346,
1424, 1504, 6626, 7181), add the OpenAPI extension x-deprecation-replaced-by for
each operation that is marked deprecated (or explicitly set it to "none"); place
the x-deprecation-replaced-by key at the same level as deprecated: true, using
the replacement operationId or path as the value (or the string "none" if there
is no replacement), and ensure proper YAML indentation and validity so the
extension is recognized by the spec.

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