-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:OpenAPI: deprecate endpoints/504s and update image_url examples #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughOpenAPI spec updated to mark multiple endpoints and some 504 Gateway Timeout responses as deprecated. Embedded multi-language examples in the same spec were edited to state that image_url may be a base64 data URI or a web URL. No functional API behavior changed. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🧹 Nitpick comments (2)
src/libs/Cohere/openapi.yaml (2)
171-171
: Deprecatessearch_queries_only
field — verify downstream SDKs.Flagging this property as deprecated is valid at the schema level, but ensure SDKs/docs show a replacement (e.g., a new mode/flag) and that generators surface this deprecation.
Please confirm replacement guidance is present in adjacent prose or
description
.
8775-8787
: Examples: model inconsistency and minor clarity nits.
- Go sample uses
model: "command-a-03-2025"
while others use"command-a-vision-07-2025"
. Align to one to avoid confusion.- Consider adding a cURL inline comment or a brief note above the block to mirror “base64 data URI or web URL” guidance.
- Model: "command-a-03-2025", + Model: "command-a-vision-07-2025",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ 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)
66-66
: Confirm intent: this deprecates the entireconnectors
property.
deprecated: true
at that schema level marks the wholeconnectors
property deprecated; if you only mean to deprecate specific connector IDs/behaviors, move that guidance into the property's description or deprecate the individual connector schema/enum members instead.- I ran the grep — this file already contains many other
deprecated: true
entries (examples: lines 171, 862, 919, 959, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181). Confirm this aligns with your overall deprecation strategy.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operation is now fully deprecated (likely unintended if you only meant to deprecate 504).
deprecated: true
at the operation level deprecates the whole endpoint, not just the 504 response. OpenAPI cannot deprecate a single response with the standard keyword.
Apply this minimal fix (remove operation deprecation here):
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
If the goal is to discourage 504 usage, prefer one of:
- Remove the 504 mapping from
responses
, or - Mark the component response as vendor-deprecated:
Additional change elsewhere (components section):
components:
responses:
GatewayTimeout:
x-deprecated: true
description: Gateway Timeout (deprecated; use 503 with Retry-After where applicable)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1007, the operation is marked
deprecated:true which unintentionally deprecates the entire endpoint rather than
only the 504 response; remove the operation-level deprecated:true flag on that
operation and instead either delete the 504 response entry from responses or
mark the shared 504 response in components/responses with a vendor deprecation
(e.g., add x-deprecated: true and adjust its description) so only the Gateway
Timeout response is treated as deprecated.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue: endpoint-wide deprecation added.
Likely should not deprecate the entire operation if intent was only about 504.
Apply same diff as above to remove deprecated: true
.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1131 the operation has been marked
with deprecated: true at the operation level (endpoint-wide), but the intention
was only to mark a specific 504 response as deprecated; remove the
operation-level deprecated: true so the operation is not entirely deprecated,
and ensure only the specific response object retains any deprecation metadata if
needed—update the YAML to delete the deprecated: true key at that operation
node.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endpoint deprecation likely unintentional.
Remove deprecated: true
here unless the whole operation is being sunset.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
deprecated: true | |
'504': | |
$ref: '#/components/responses/GatewayTimeout' |
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml at line 1201, the operation is marked with
deprecated: true likely by mistake; remove the deprecated: true entry for that
operation (or set it to false) so the endpoint is not flagged as deprecated in
the OpenAPI spec and regenerate/validate the spec to ensure no schema errors.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endpoint marked deprecated — confirm policy/date if intentional.
If truly deprecating, include deprecation rationale/date in description and consider documenting a Sunset plan. Otherwise, remove.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1274, the endpoint is marked
deprecated but lacks any rationale or deprecation date; either confirm the
deprecation is intentional and update the endpoint's description to include the
reason, an official deprecation date and optional Sunset plan/alternative
endpoints, or remove the deprecated flag if it was set mistakenly; ensure the
description follows OpenAPI conventions (e.g., clearly labelled deprecation
rationale and date) and update any related documentation references and
changelog entries accordingly.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: operation-level deprecation added.
Remove unless the endpoint is intentionally deprecated.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
deprecated: true | |
'504': | |
$ref: '#/components/responses/GatewayTimeout' |
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1346 there is an operation-level
deprecation flag set; remove the operation's "deprecated: true" entry (or change
it to false) unless this endpoint is intentionally deprecated, and ensure the
operation block no longer contains the deprecated field so the endpoint is
treated as active in the OpenAPI spec.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same pattern — likely unintended full deprecation.
See earlier notes; remove here too.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
deprecated: true | |
'504': | |
$ref: '#/components/responses/GatewayTimeout' |
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1424, there is the same unintended
full deprecation marker as noted earlier; remove the erroneous deprecation entry
at this location (e.g., delete the global or operation-level "deprecated:
true"/equivalent field) so only the intended individual parameters or properties
remain marked deprecated, and validate the OpenAPI file after removal to ensure
no other deprecated flags were accidentally applied.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: remove operation-level deprecated
.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 1504, there is an operation-level
"deprecated" field; remove this operation-level deprecated flag (delete the
"deprecated: true/false" entry under the operation object) so that deprecation
is not declared at the operation level in the OpenAPI spec; if deprecation
metadata is required, use component/schema-level or response-level deprecation
instead.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue repeated.
Remove unless intentionally sunsetting the entire operation.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
deprecated: true | |
'504': | |
$ref: '#/components/responses/GatewayTimeout' |
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 6626 there is a repeated operation
definition; remove this duplicate operation block (or consolidate it with the
original) unless the duplicate is intentionally kept to sunset the operation, in
which case add a clear comment and deprecation metadata. Ensure references,
operationId, and paths do not collide after removal and run the OpenAPI
linter/validator to confirm the spec remains valid.
$ref: '#/components/responses/ServiceUnavailable' | ||
'504': | ||
$ref: '#/components/responses/GatewayTimeout' | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: accidental endpoint deprecation.
Apply the same fix.
'504':
$ref: '#/components/responses/GatewayTimeout'
- deprecated: true
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around line 7181 the endpoint was accidentally
marked as deprecated; remove the unintended deprecation by deleting the
"deprecated: true" entry (or set it to "deprecated: false") for that operation,
ensure the operationId and description remain unchanged, and run OpenAPI
validation to confirm the spec is valid after the edit.
Summary by CodeRabbit