feat: improve retry ergonomics with sensible defaults#32
Merged
Conversation
- Default to 3 retries with error feedback (was: no retries) - Remove include_error_feedback() - error feedback is now always on - Add no_retries() convenience method to disable retries - Update all examples and README to reflect new defaults BREAKING CHANGE: include_error_feedback() method removed. Error feedback is now always included when retrying. Use no_retries() to disable retries entirely. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reformat long method chains in example files - Standardize indentation in backend configuration structs - Align comments and field values for better readability
- Remove redundant schema instructions from example prompts - Add token_usage_example.rs to demonstrate metadata tracking - Update movie example to include Grok and Gemini backends - Remove obsolete recipe and container description examples - Remove manual retry overrides in favor of new library defaults
- Distribute providers across examples for faster CI runs: - structured_movie_info.rs → OpenAI - nested_objects_example.rs → Gemini - news_article_categorizer.rs → Grok - event_planner.rs → Anthropic - Fix Gemini structured outputs by stripping unsupported JSON Schema keywords (examples, additionalProperties, title, etc.) from the response_schema. Gemini's API doesn't support these keywords and would return "Invalid request: Unknown name 'examples'" errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests to verify that prepare_gemini_schema correctly strips unsupported JSON Schema keywords like examples, additionalProperties, title, and $schema from schemas before sending to Gemini API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update OpenAI example to gpt-5.2 (latest) - Update Anthropic example to claude-sonnet-4-5-20250929 (latest) - Update Grok example to grok-4-1-fast-non-reasoning (latest) - Update Gemini example to gemini-3-flash-preview (latest) - Update extended thinking section to reference GPT-5.2, Claude 4.5, Gemini 3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <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.
BREAKING CHANGE: include_error_feedback() method removed. Error feedback is now always included when retrying. Use no_retries() to disable retries entirely.
🤖 Generated with Claude Code