Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 22, 2025

Summary by CodeRabbit

  • Documentation
    • Marked numerous public API endpoints as deprecated in the published API specification; deprecation notices are now visible across affected operations.
    • Refreshed multi-language code examples (Java, Python, Go, JavaScript, curl) to clarify that image_url can be provided as either a base64 data URI or a web URL.
    • Minor example formatting/annotation updates for consistency; no changes to request/response structures or SDK signatures.

Copy link

coderabbitai bot commented Sep 22, 2025

Walkthrough

Marked numerous API operations in src/libs/Cohere/openapi.yaml as deprecated via metadata updates. Also adjusted embedded multi-language sample snippets to clarify that image_url can be a base64 data URI or a web URL. No functional logic or public signatures changed.

Changes

Cohort / File(s) Summary
OpenAPI deprecations
src/libs/Cohere/openapi.yaml
Added deprecated: true to many public API operations/responses across multiple paths, following existing response blocks (e.g., 504), marking those endpoints as deprecated in the spec.
Sample comment clarifications
src/libs/Cohere/openapi.yaml
Updated inline examples (Java, Python, Go, JavaScript, curl) to add/explain that image_url may be a base64 data URI or a web URL; no behavioral changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I tap my paw on YAML lanes,
Flagging routes with sunset stains.
Samples whisper, clear and bright:
“Data URI or URL—both are right.”
Deprecated paths now softly fade—
A tidy warren, neatly laid.
Hop, commit, and merge parade! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" is not a short, descriptive summary of the actual changes and reads like an annotation/mention rather than the main change; the PR actually updates src/libs/Cohere/openapi.yaml to mark many public operations as deprecated and clarifies image_url comments in sample code, which the title does not convey. Because it fails to communicate the primary change to reviewers or in repository history, it does not meet the clarity/relevance criteria for a good PR title. Rename the PR to a concise, specific title such as "openapi: mark public endpoints deprecated and clarify image_url examples" or "docs(openapi): deprecate endpoints and update sample comments", and update the description to include a one-sentence summary of the main change.
✅ 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_202509220338

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 22, 2025 03:39
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate operations in Cohere openapi.yaml; clarify image_url samples Sep 22, 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 (11)
src/libs/Cohere/openapi.yaml (11)

63-69: Schema-level deprecation added—document the migration path.

Good use of deprecated: true at the property schema. Please add an explicit replacement pointer and rationale to aid SDK/codegen consumers (e.g., x-deprecation-message and/or augment description with “Use <new field/endpoint> instead”). Also verify this property’s parent schema declares type: array above items (not visible in the hunk).


168-174: Parameter deprecation needs successor guidance.

Marking search_queries_only as deprecated is fine; include the intended alternative (field/flag) and expected removal/sunset date in the description or via a vendor extension to minimize breaking changes during regeneration.


1004-1010: Operation deprecated—add Deprecation/Sunset headers and a successor link.

Consider adding:

  • A brief deprecation note in description.
  • Response headers Deprecation and Sunset (RFC 8594).
  • A Link header with rel="successor-version" (or vendor extension like x-replaced-by) to the new path.

Example patch near this operation:

       '504':
         $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
+      deprecated: true
+      description: "Deprecated. Use POST /v2/chat instead."
+      responses:
+        default:
+          headers:
+            Deprecation:
+              schema: { type: string }
+              description: "true or date"
+            Sunset:
+              schema: { type: string, format: date-time }
+              description: "Service sunset date/time"
+            Link:
+              schema: { type: string }
+              description: 'e.g., </v2/chat>; rel="successor-version"'

1128-1134: Repeat: deprecation metadata is good; include migration details.

Same recommendation as prior hunk: deprecation description + headers and successor pointer.


1198-1204: Repeat: strengthen deprecation with operational guidance.

Add Deprecation/Sunset headers and successor path reference.


1271-1277: Repeat: clarify deprecation intent.

Please add a short description and successor link/header metadata.


1343-1349: Repeat: add headers + replacement pointer.

Ensure clients see Deprecation/Sunset and a Link to the replacement operation.


1421-1427: Repeat: operation-level deprecation hygiene.

Add deprecation description and response headers for smoother migration.


1501-1507: Repeat: deprecation UX for clients.

Include Deprecation/Sunset headers and successor operation reference.


6623-6629: Repeat: complete the deprecation story.

Document alternative endpoint and add deprecation headers.


7178-7184: Repeat: add migration breadcrumbs.

Provide replacement path and headers so SDKs can surface clear warnings.

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

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

8775-8787: Align Go sample to a vision-capable model

Go example sends image_url but sets Model: "command-a-03-2025" (non‑vision). Replace with a vision model, e.g. Model: "command-a-vision-07-2025". Verification: OpenAPI validation returned OK, but ripgrep produced no matches for the Go 'Model: "command-.*"' pattern in src/libs/Cohere/openapi.yaml — confirm the sample at src/libs/Cohere/openapi.yaml (lines 8775–8787) and apply the model change if present.

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