Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 20, 2025

Summary by CodeRabbit

  • Documentation
    • Marked multiple API endpoints and certain 504 responses as deprecated in the public API specification, improving clarity in generated docs and SDKs.
    • Updated code examples (TypeScript/JavaScript, Python, Java, Go) to note that image_url supports base64 data URIs or web URLs; curl example unchanged.
  • Chores
    • Improved API surface visibility by flagging deprecated routes without impacting behavior of active endpoints.

@coderabbitai
Copy link

coderabbitai bot commented Sep 20, 2025

Walkthrough

The OpenAPI spec at src/libs/Cohere/openapi.yaml was updated to mark numerous endpoints and several 504 response references as deprecated. Language-specific code samples were adjusted to note that image_url accepts either a base64 data URI or a web URL. No runtime behavior changes are indicated.

Changes

Cohort / File(s) Summary of Changes
Deprecations in OpenAPI paths and responses
src/libs/Cohere/openapi.yaml
Added deprecated: true across multiple path entries and attached to several 504 response references.
Example code comments update
src/libs/Cohere/openapi.yaml (examples: TypeScript/JavaScript, Python, Java, Go, curl)
Inserted inline comments clarifying that image_url can be a base64 data URI or a web URL in TS/JS, Python, Java, and Go examples; curl remains structurally unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my whiskers at YAML lines,
Flags of “deprecated” in tidy signs.
Samples now whisper, “URLs or base64,”
A carrot of clarity—nothing more.
I thump in docs, then hop away—
The spec stays calm, updated today. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" is not descriptive of this changeset, which primarily marks numerous OpenAPI endpoints/responses as deprecated and updates language-specific example comments for image_url; the title appears to be a tag or mention rather than a summary of the main change. It does not give reviewers a clear, concise sense of the primary modification or scope. Therefore the title fails the requirement to summarize the main change for quick scanning. Rename the PR to a concise, descriptive title that reflects the main change (for example: "openapi: mark deprecated Cohere endpoints and clarify image_url examples" or "chore(openapi): deprecate endpoints and update sample code comments") and update the PR description to match that title so reviewers can quickly understand the intent.
✅ 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_202509201825

📜 Recent 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 0e6c422.

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

66-66: LGTM! Appropriate deprecation marking.

The deprecation of the connectors parameter is correctly implemented following OpenAPI specification standards.


171-171: LGTM! Consistent deprecation approach.

The search_queries_only parameter deprecation follows the same pattern as other deprecated fields in the spec.


1007-1007: LGTM! Systematic endpoint deprecation.

The endpoints are being properly marked as deprecated using the standard OpenAPI deprecated: true flag. This provides clear indication to API consumers that these endpoints should not be used in new implementations.

Also applies to: 1131-1131, 1201-1201, 1274-1274, 1346-1346, 1424-1424, 1504-1504, 6626-6626, 7181-7181


8775-8787: LGTM! Helpful clarification added to code examples.

The addition of comments explaining that image_url accepts both base64 data URIs and web URLs provides valuable guidance to developers across all supported languages (TypeScript, Python, Java, Go). The comments are consistently formatted according to each language's conventions.


66-66: Verify the deprecation timeline and migration path.

The large number of simultaneously deprecated endpoints and parameters suggests a significant API surface area change. Consider verifying:

  1. Whether proper deprecation notices and migration documentation exist
  2. If there's a timeline for complete removal of these deprecated features
  3. That alternative endpoints or parameters are available for deprecated functionality

Based on the search results, the deprecations are part of Cohere's API v2 release, where several v1 features like connectors, conversation_id, prompt_truncation, force_single_step, and preamble are no longer supported in the V2 Chat API. Migration guides are available for moving from API v1 to v2, and the V2 APIs are currently in Beta and subject to updates.

Also applies to: 171-171, 1007-1007, 1131-1131, 1201-1201, 1274-1274, 1346-1346, 1424-1424, 1504-1504, 6626-6626, 7181-7181


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 20, 2025 18:26
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate OpenAPI endpoints and 504 refs; update image_url samples Sep 20, 2025
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