feat(academic-plotting): support switchable image models, default gpt-image-2 - #71
Open
haozhou-wong wants to merge 1 commit into
Open
Conversation
…-image-2 Replace the Gemini-only diagram workflow with a single OpenAI-compatible HTTP path. The generation script now reads three constants (MODEL, API_URL, API_KEY_ENV) so any image-generation model on OpenRouter or a compatible endpoint can be used; defaults to openai/gpt-image-2. - rewrite generation script template with requests, drop google-genai - add Model & Endpoint Configuration section with usage notes (model discovery, size/aspect_ratio/quality fields, direct OpenAI) - replace dangling latex-posters reference with beamerposter/tikzposter - sync skill description and line count in README - bump skill version to 2.0.0: the default workflow now reads OPENROUTER_API_KEY instead of GEMINI_API_KEY, and google-genai is no longer a dependency
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
The diagram workflow (Workflow 1) in
20-ml-paper-writing/academic-plottingwas hardcoded to the Gemini SDK (google-genai+GEMINI_API_KEY+gemini-3-pro-image-preview). This PR makes the image model freely switchable and changes the default togpt-image-2.requestsagainst any OpenAI-compatible image endpoint(OpenRouter by default)MODEL,API_URL,API_KEY_ENV) select model/endpoint/key per figure; defaults toopenai/gpt-image-2viahttps://openrouter.ai/api/v1/imagesOPENROUTER_API_KEYinstead ofGEMINI_API_KEY, andgoogle-genaiis removed from dependenciesChanges
SKILL.md(495 lines)size/aspect_ratio/qualitypayload fields, direct OpenAI setup);requests-based generation script template; Gemini-specific wording generalized; danglinglatex-postersreference replaced withbeamerposter/tikzposterreferences/diagram-generation.mdopenai/gpt-image-2(default) andgoogle/gemini-3-pro-image-preview; prompt-engineering guidance unchanged and model-agnosticREADME.mdTest plan
python -m py_compile)constraints verified against OpenRouter and OpenAI documentation
google-genai/GEMINI_API_KEYreferences in the skill