Skip to content

feat: improve retry ergonomics with sensible defaults#32

Merged
clifton merged 6 commits intomainfrom
retry-ergonomics
Dec 31, 2025
Merged

feat: improve retry ergonomics with sensible defaults#32
clifton merged 6 commits intomainfrom
retry-ergonomics

Conversation

@clifton
Copy link
Owner

@clifton clifton commented Dec 31, 2025

  • 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

clifton and others added 6 commits December 30, 2025 21:47
- 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>
@clifton clifton merged commit 1b1ac73 into main Dec 31, 2025
8 checks passed
@clifton clifton deleted the retry-ergonomics branch December 31, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant