Repository navigation
tools: bfoptimizer: support multiple providers through OpenRouter - #623
Merged
Merged
Conversation
qdeslandes
marked this pull request as ready for review
October 29, 2026 11:35
qdeslandes
enabled auto-merge (rebase)
October 29, 2026 11:35
5 tasks done
Replace the Claude SDK integrations with OpenRouter so each optimization phase and commit generation can use a configured model ID. Run file and shell tools in a bounded agent loop, preserve reasoning state between requests, and include commit generation in attempt costs. Document the setup and the differences from the previous SDK.
qdeslandes
force-pushed
the
bfoptimizer-openrouter
branch
from
October 29, 2026 12:33
4a27d9a to
1c23bd0
Compare
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.
Summary
Replace the Claude Agent SDK and Anthropic SDK integrations with OpenRouter's Chat Completions API. Each phase (proposal, implementation, and commit message) can then use any model available on OpenRouter, instead of a fixed list of Claude models.
--proposal-modeland--impl-modeltake OpenRouter model IDs, and the new--commit-modelselects the commit message model. bfoptimizer checks the IDs against OpenRouter's model list at startup, and needsOPENROUTER_API_KEYinstead of Anthropic credentials.anthropicandclaude_agent_sdkpackages are no longer needed: the transport only uses the Python standard library.Related issue
None. bfoptimizer was limited to Claude models, and this change removes that limit.
Testing
AI disclosure
Deferred most of the work to Claude, reviewed and owned by me
Checklist
make -C $BUILD test_bin testpasses and the code follows the style guidecomponent: subcomponent: short description