docs(rust): sync async-openai version pin to 0.38#660
Merged
Conversation
The cycles-client-rust PR (companion to this one) had to bump async-openai 0.30 → 0.38 to clear `cargo audit --deny warnings` — 0.30.x pulled in `backoff` (RUSTSEC-2025-0012) and `instant` (RUSTSEC-2024-0384), both flagged as unmaintained. 0.31+ replaced the retry stack with `tower` and dropped both transitive deps. Brings this doc in sync with the actual shipped example: - Cargo.toml snippet: pin to `0.38` with `default-features = false, features = ["chat-completion", "rustls"]` (the 0.31+ split exposed per-API features; `chat-completion` is what makes `Client` and the chat types available). - All three code blocks (basic, streaming, error-handling): update imports from `async_openai::types::` to `async_openai::types::chat::` (the chat-completion types moved out of the top-level `types::` module in 0.31). - Replaced the "type paths accurate to the 0.30.x line" caveat with an explanation of the 0.30→0.31+ split (feature gating + `types::chat::` path move + tower-vs-backoff retry stack swap), so readers upgrading from 0.30 understand what changed. - Dropped the unused `Role` import from the basic example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to PR #659 (already merged). The companion cycles-client-rust PR (#37) had to bump async-openai 0.30 → 0.38 to clear `cargo audit --deny warnings` — 0.30.x pulled in two unmaintained transitive deps:
async-openai 0.31+ replaced the retry stack with `tower` and dropped both. The example in cycles-client-rust now pins `0.38`. This PR brings the docs in sync so the how-to matches what an evaluator will actually `cargo add` against.
Changes
`how-to/integrating-cycles-with-async-openai.md`:
Why this is a separate PR
The version-sync commit was pushed to the old PR #659 branch after #659 had already been merged. Rather than reopen the merged PR, branching off main is the clean path.
Test plan