release: 0.10.0 — deprecate old constructors, migrate to from_config#60
Merged
Conversation
Completes Phase B: the config-first construction API (shipped additively in #59) becomes the recommended path, the old builders are deprecated, and every call site across the codebase and docs migrates to it. Deprecated (since 0.10.0, removed in 1.0 — all still work, with a compiler warning pointing at the replacement): - Agent::new, Agent::with_model, Agent::with_model_config - SubAgentTool::new, SubAgentTool::with_model, SubAgentTool::with_model_config The SubAgentTool from_* builders now route through a private `build()` so they don't trip their own deprecation lint. Migrated to the new API (CI is -Dwarnings, so every compiled call site had to move in this commit): - All examples (code_review, rlm, shared_state; basic/sub_agent/callbacks/ persistence/cli were done in #59) and both src doctests. - All tests, except two kept on the deprecated API under #[allow(deprecated)] to preserve its coverage until 1.0: test_agent_builder_pattern (asserts the builder's effect) and session_cost_usd_none_without_model_config (the no-config None branch is only reachable via Agent::new). - All 19 mdBook pages (providers/concepts/guides/reference). Azure/Bedrock/ Vertex use ModelConfig::custom since no preset exists. Release: - Version 0.10.0. - CHANGELOG.md with a migration guide (before/after table). - README install snippet 0.9 -> 0.10; docs/installation 0.5 -> 0.10 and MSRV 1.56 -> 1.86; README OpenAI-compat example now builds an agent via from_config instead of dangling a registry. Verified: cargo clippy --all-targets --all-features (-Dwarnings) clean; cargo test --all-features all green; cargo doc (-Dwarnings) clean; doctests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Doc-accuracy review of the migrated (un-CI-compiled) mdBook pages surfaced: - docs/providers/model-presets.md: `with_thinking_level` is not a real method (it's `with_thinking`) — fixed both occurrences. The migration rewrote these blocks and should have caught the invented call. - docs/getting-started/installation.md: the openapi-feature snippet still pinned `version = "0.5"` (the main install line was bumped to 0.10 but this one was missed) → 0.10; and listed `serde_yaml` where the crate now uses `serde_yaml_ng`. - docs/concepts/prompt-caching.md: the Bedrock row claimed "Automatic (where supported)", contradicting README's "Bedrock has no automatic caching" — reconciled to no automatic caching. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Completes Phase B. The config-first construction API (shipped additively in #59) becomes the recommended path: the old builders are now
#[deprecated(since = "0.10.0")], and every call site across code and docs migrates tofrom_config.Deprecated (removed in 1.0 — still work, with a compiler nudge)
Agent::new,Agent::with_model,Agent::with_model_configSubAgentTool::new,SubAgentTool::with_model,SubAgentTool::with_model_configThe migration
Full before/after table in CHANGELOG.md.
with_api_keyis not deprecated.Sweep (CI is
-Dwarnings, so every compiled site moved here)code_review,rlm,shared_state) + both src doctests.#[allow(deprecated)]to retain coverage of the deprecated-but-present API until 1.0:test_agent_builder_pattern(asserts the builder's effect) andsession_cost_usd_none_without_model_config(the no-configNonebranch is only reachable viaAgent::new).ModelConfig::custom(no preset exists).SubAgentToolfrom_*route through a privatebuild()so they don't trip their own deprecation lint.Release bits
CHANGELOG.mdwith migration guide.0.9 → 0.10;docs/installation0.5 → 0.10+ MSRV1.56 → 1.86; README OpenAI-compat example now builds viafrom_config.Verification
cargo clippy --all-targets --all-features(-Dwarnings) — cleancargo test --all-features— all greencargo doc(-Dwarnings) + doctests — cleanNot in this PR
The crates.io publish (tag + GitHub Release, which triggers
publish.yml) is held for maintainer sign-off, per the release flow.🤖 Generated with Claude Code