Repository navigation
feat: decisions(); refuse search on non-xAI models; route search to xai/*; fix Surf pointer - #115
Merged
Merged
Conversation
added 2 commits
November 15, 2026 19:01
…ai/*; fix Surf pointer - decisions() on LLMClient, AsyncLLMClient, SolanaLLMClient and AsyncSolanaLLMClient (POST /v1/decisions, OpenAI Decisions-compatible). Live: $0.001045 on Solana exact. - search=True / search_parameters / x_search|web_search tools on a non-xai/* model (or fallback) raise ValueError before anything is sent; the gateway answered 400 SEARCH_UNSUPPORTED after the probe. Docstring examples fixed. - smart_chat_completion(search=True) narrows the routed chain to xai/*, else the catalog's search-capable xAI models (cheapest; premium: priciest), mirroring the TS SDK. The free profile with search raises. - SurfClient's warning named LLMClient.price, which does not exist. - CLAUDE.md / AGENTS.md: no Pyth, no retired free-model list.
Merged
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.
Follow-ups from the README resync (#114).
decisions()on all four clients →POST /v1/decisions(OpenAI Decisions-compatible,gpt-6-luna), returningDecisionsResponse. Reuses_request_with_payment_raw(cost log, tx log;/v1/decisionsis not in the cache allow-list, so never cached).build_decisions_body()raisesValueErroron a malformed request before sending. Live on Solana exact: two questions, $0.001045. Mirrors TS@blockrun/llm#121.Search guard. The gateway serves search on
xai/*only (400SEARCH_UNSUPPORTEDotherwise), and thechat()/chat_completion()docstrings showedopenai/gpt-5.2+search=True. Now:chat_completion/chat_completion_stream(sync + async, Base + Solana) raiseValueErrorfor a search request on a non-xai/*model or fallback, before anything is sent.smart_chat_completion(..., search=True)narrows the routed chain toxai/*; with none, it uses the catalog's search-tagged xAI models (cheapest first; premium: priciest first), like the TS SDK'srouteWithCatalog.build_model_pricing()records them on adictsubclass, so no call site changes. Free profile + search raises.Surf. The deprecation warning pointed at
LLMClient.price(does not exist) →PriceClient,LLMClient.pm,LLMClient.defi/dex.Docs. README Decisions section + search note, CHANGELOG, CLAUDE.md (no Pyth; tree), AGENTS.md (drops the long-retired free-model list).
Left alone on purpose:
router_core/config.py'smoonshot/kimi-k3fallbacks match upstream router-core main (5 entries there too) and the gateway keepskimi-k3routable; the port is not hand-edited.pytest unit 1604 passed (35 new), ruff clean, black clean, mypy unchanged from main (248 pre-existing).