fix: pin OpenRouter to Cerebras via provider.only instead of provider.order - #43
Merged
Conversation
- Change DEFAULT_PROVIDER from "openrouter" to "cerebras" - Change DEFAULT_PROVIDER_ORDER from ["Groq", "Together", "Fireworks"] to ["Cerebras"] - Change OpenRouter provider routing from "order" (soft preference) to "only" (hard pin) so requests fail rather than silently falling through to non-Cerebras providers - Update module docstring to reflect new defaults
…r.only Revert the DEFAULT_PROVIDER change back to openrouter. Lore extraction uses OpenRouter as the transport but hard-pins to Cerebras through provider.only (DEFAULT_PROVIDER_ORDER = ["Cerebras"]). The provider itself stays openrouter. Docstrings and docs/auto-extraction-setup.md updated to present OpenRouter (pinned to Cerebras) as the default and Cerebras-direct as the alternative, while preserving the only-vs-order explanation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The OpenRouter request body now uses provider.only (hard-pin semantics) instead of provider.order, and the provider list changed from ["Groq", "Together", "Fireworks"] to ["Cerebras"]. Update both test_provider_order_in_request_body and test_openrouter_still_has_provider_routing to match the new key and value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- __aexit__(self, *exc) -> *_ (exc tuple never accessed) - _factory(*args, **kwargs) -> *_args, **_kwargs (mock stub ignores params)
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.
Problem
gpt-oss-120bwas being routed by OpenRouter to non-Cerebras providers because:DEFAULT_PROVIDER_ORDER = ["Groq", "Together", "Fireworks"]— Cerebras not in the listprovider.order(soft preference, falls through to others) instead ofprovider.only(hard pin, fails rather than routing elsewhere)Changes
src/lore/extraction/client.pyDEFAULT_PROVIDER_ORDER:["Groq", "Together", "Fireworks"]→["Cerebras"]"provider": {"order": [...]}→"provider": {"only": [...]}— hard pin, will fail loudly if Cerebras is unavailable rather than silently routing to Groq/Together/FireworksDEFAULT_PROVIDERstays"openrouter"— OpenRouter remains the transport. Cerebras is the pinned backend within OpenRouter.docs/auto-extraction-setup.mdprovider.onlyvsprovider.orderdistinctionprovider_order: ["Cerebras"]in config becomesprovider.onlyin the OpenRouter requestConfig required
In your lore plugin config (
plugins/lore/config.json):This is already set correctly on the running instance.