-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add deprecation flags; clarify Images image_url data URI or URL #285
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
WalkthroughDeprecation flags were added to multiple endpoints and two query parameters (conversation_id, search_queries_only) in src/libs/Cohere/openapi.yaml. Documentation code samples for Images were updated to clarify that image_url accepts either a base64 data URI or a web URL across TypeScript, Python, Java, and Go. Changes
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: 1
📜 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.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.csis 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 (4)
src/libs/Cohere/openapi.yaml (4)
66-66: LGTM! Proper deprecation marking for connectors parameter.The
connectorsparameter is correctly marked as deprecated, which aligns with the API evolution strategy.
171-171: LGTM! Proper deprecation marking for search_queries_only parameter.The
search_queries_onlyparameter is correctly marked as deprecated with appropriate documentation preserved.
1007-1007: LGTM! Consistent deprecation marking across multiple endpoints.All endpoints are properly marked as deprecated following OpenAPI specification standards. The deprecation flags are consistently placed after error response definitions and before audience specifications.
Also applies to: 1131-1131, 1201-1201, 1274-1274, 1346-1346, 1424-1424, 1504-1504, 6626-6626, 7181-7181
8775-8786: LGTM! Improved documentation with helpful clarifications.The code samples now include clear comments indicating that
image_url/urlfields accept both base64 data URIs and web URLs. This enhancement improves developer experience across all supported languages (TypeScript, Python, Java, Go).
| items: | ||
| $ref: '#/components/schemas/ChatConnector' | ||
| description: "Accepts `{\"id\": \"web-search\"}`, and/or the `\"id\"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n" | ||
| 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.
🧩 Analysis chain
Verify that deprecated endpoints and parameters are documented in migration guides.
With multiple endpoints and parameters being deprecated, ensure that:
- Migration documentation is available for users
- Alternative endpoints/parameters are clearly specified
- Deprecation timeline is communicated
Also applies to: 171-171, 1007-1007, 1131-1131, 1201-1201, 1274-1274, 1346-1346, 1424-1424, 1504-1504, 6626-6626, 7181-7181
🏁 Script executed:
#!/bin/bash
# Description: Check for migration documentation and alternative endpoints for deprecated items
# Search for migration guides or deprecation notices in documentation
echo "=== Searching for migration guides ==="
fd -t f -e md -e rst -e txt . | head -20 | xargs rg -l -i "(migration|deprecat|alternative)" 2>/dev/null || echo "No migration docs found in common locations"
# Check if there are newer versions of deprecated endpoints
echo "=== Checking for v2 or newer API versions ==="
rg -A 3 -B 3 "(/v[2-9]/|/api/v[2-9]/)" src/libs/Cohere/openapi.yaml | head -20
# Look for CHANGELOG or similar files
echo "=== Checking for changelog files ==="
fd -t f "(CHANGELOG|CHANGES|HISTORY|NEWS)" .
# Check for any replacement endpoints mentioned in descriptions
echo "=== Searching for replacement mentions in OpenAPI spec ==="
rg -i -A 2 -B 2 "(replac|instead|use.*instead|migrat|alternative)" src/libs/Cohere/openapi.yaml | head -20Length of output: 11344
Add migration guide and changelog entries for deprecated Cohere endpoints
No migration docs or CHANGELOG were found; src/libs/Cohere/openapi.yaml has deprecated items at lines 66, 171, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181 but contains no replacement/migration notes. Add a migration guide that lists alternative endpoints/parameters, update the OpenAPI descriptions to reference those replacements, and publish a deprecation timeline (also add a CHANGELOG entry).
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 66, 171, 1007, 1131, 1201, 1274,
1346, 1424, 1504, 6626, 7181, several endpoints are marked deprecated but lack
migration guidance or changelog entries; add a new migration guide document
(e.g., docs/migration/cohere-deprecations.md) listing each deprecated
endpoint/parameter with the recommended replacement endpoints/parameters,
example request/response mappings, and a proposed deprecation timeline (dates
for soft-deprecation, removal, and recommended migration window); update the
OpenAPI spec descriptions for each deprecated item to reference the migration
guide and the exact replacement (use description fields and/or standard OpenAPI
x-deprecated or deprecationMetadata extensions), and create/update a
CHANGELOG.md entry describing the deprecations, replacements, timeline, and any
breaking changes so consumers can act on the migration instructions.
Summary by CodeRabbit