fix(xai): forward image_gen.model kwarg to _resolve_model in generate() - #10
Open
hashbender wants to merge 1 commit into
Open
fix(xai): forward image_gen.model kwarg to _resolve_model in generate()#10hashbender wants to merge 1 commit into
hashbender wants to merge 1 commit into
Conversation
|
Review Complete Risk: 🟠 High (72/100) — no findings · 57 LOC across 2 files New xAI image generation provider plugin adds a missing 401/OAuth token refresh retry gap found against the sister xAI web search provider pattern; other findings fall below confidence threshold. Files Reviewed (2 files) |
hashbender
pushed a commit
that referenced
this pull request
Jul 27, 2026
…e_check_xsrf pitfalls Add two pitfalls discovered when running the skill against a fresh Jupyter server: - Pitfall #9: When the websocket reply channel hangs on every execute even though the kernel actually ran (REST shows execution_state=idle and execution_count increments), force zmq transport with --transport zmq. The zmq transport uses jupyter_client directly and sidesteps the broken websocket layer. - Pitfall #10: A fresh ServerApp rejects POST /api/sessions with "_xsrf argument missing from POST" unless you start it with --ServerApp.disable_check_xsrf=True. Needed for REST-only flows where no browser/cookie is establishing the XSRF token.
hashbender
pushed a commit
that referenced
this pull request
Aug 11, 2026
…lves A session title had no notion of who set it, so two bugs followed. An auto-generated title could clobber a name the user typed, and every compression rotation renumbered the conversation it forked - one piece of work reaching 'Smallville Map Architecture Plan #10' in the sidebar. Titles now carry a source (derived < llm < user) enforced by one compare-and-swap, so an automatic write can only ever replace a title of strictly lower authority. Compression carries the name across unchanged. Legacy NULL rows rank as user, so auto-titling only fills genuinely empty titles on existing data.
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
XAIImageGenProvider.generate()accepts**kwargsbut calls_resolve_model()with no arguments, silently discarding anymodelthe caller passes.tools/image_generation_tool.pyputskwargs["model"] = configured_model(fromimage_gen.modelinconfig.yaml) into everyprovider.generate()call. For the xAI provider, this meant a user selectinggrok-imagine-image-qualityviahermes toolsalways got the defaultgrok-imagine-imagewith no error or log.kwargs.get("model")into its own resolver.Fix
Add an optional
caller_modelparameter to_resolve_model()at the highest priority (aboveXAI_IMAGE_MODELenv and config), and passkwargs.get("model")fromgenerate(). An unrecognised model name falls through to the existing priority chain unchanged.Test plan
test_caller_model_overrides_env— caller model wins overXAI_IMAGE_MODELenvtest_unknown_caller_model_falls_back_to_env— invalid name falls through safelytest_model_kwarg_forwarded_to_generate— end-to-end:generate(model="grok-imagine-image-quality")uses the quality model in the POST payload and resultpytest tests/plugins/image_gen/test_xai_provider.py→ 32 passed, 0 failedMirror-of: NousResearch#55893
NousResearch#55893