Skip to content

fix(#76,#77): add retry loop to oo learn, remove OpenAI/Cerebras#78

Merged
randomm merged 3 commits intomainfrom
fix/issue-76-retry-loop
Mar 5, 2026
Merged

fix(#76,#77): add retry loop to oo learn, remove OpenAI/Cerebras#78
randomm merged 3 commits intomainfrom
fix/issue-76-retry-loop

Conversation

@randomm
Copy link
Copy Markdown
Owner

@randomm randomm commented Mar 5, 2026

Summary

Adds a retry-with-feedback loop to oo learn: on invalid TOML, sends the parse error back to the LLM and retries up to 3 total attempts. Sets temperature: 0.0 on all Anthropic API calls for deterministic output. Removes unverified OpenAI and Cerebras provider support (Anthropic only). Introduces LearnParams struct + run_learn_with_config() for thread-safe testing. 4 new end-to-end retry tests using mockito mock HTTP server.

Test coverage

191 tests passing. Retry logic tested end-to-end through run_learn_with_config():

  • Success on 2nd attempt
  • Success on 3rd attempt
  • All 3 attempts exhausted → Err("failed after 3 attempts: ...")
  • temperature: 0.0 verified in Anthropic request body

Fixes #76
Fixes #77

Janni Turunen added 3 commits March 5, 2026 11:32
- Retry up to 3 total attempts on invalid TOML with error feedback
- Set temperature 0.0 for deterministic LLM output
- Remove unverified OpenAI and Cerebras provider support
- Introduce LearnParams for thread-safe testability
- Add 4 end-to-end retry tests via mock HTTP server

Fixes #76
Fixes #77
@randomm randomm marked this pull request as ready for review March 5, 2026 09:39
@randomm randomm merged commit 99ecc7a into main Mar 5, 2026
8 checks passed
@randomm randomm deleted the fix/issue-76-retry-loop branch March 5, 2026 09:42
@randomm randomm mentioned this pull request Mar 5, 2026
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.

fix: remove OpenAI and Cerebras provider support from oo learn fix: add retry-with-feedback loop to oo learn for invalid TOML

1 participant