Skip to content

feat(academic-plotting): support switchable image models, default gpt-image-2 - #71

Open
haozhou-wong wants to merge 1 commit into
Orchestra-Research:mainfrom
haozhou-wong:feat/academic-plotting-multi-model
Open

feat(academic-plotting): support switchable image models, default gpt-image-2#71
haozhou-wong wants to merge 1 commit into
Orchestra-Research:mainfrom
haozhou-wong:feat/academic-plotting-multi-model

Conversation

@haozhou-wong

@haozhou-wong haozhou-wong commented Jul 14, 2026

Copy link
Copy Markdown

Summary

The diagram workflow (Workflow 1) in 20-ml-paper-writing/academic-plotting was 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 to gpt-image-2.

  • Single HTTP path: the generation script template now uses requests against any OpenAI-compatible image endpoint(OpenRouter by default)
  • Three config constants (MODEL, API_URL, API_KEY_ENV) select model/endpoint/key per figure; defaults to openai/gpt-image-2 via https://openrouter.ai/api/v1/images
  • Version bump: skill 1.0.0 → 2.0.0 — the default workflow now reads OPENROUTER_API_KEY instead of GEMINI_API_KEY, and google-genai is removed from dependencies

Changes

File Change
SKILL.md (495 lines) New "Model & Endpoint Configuration" section (defaults table, model discovery, size/aspect_ratio/quality payload fields, direct OpenAI setup); requests-based generation script template; Gemini-specific wording generalized; dangling latex-posters reference replaced with beamerposter/tikzposter
references/diagram-generation.md Model Selection updated to openai/gpt-image-2 (default) and google/gemini-3-pro-image-preview; prompt-engineering guidance unchanged and model-agnostic
README.md Skill description line synced

Test plan

  • SKILL.md YAML frontmatter parses correctly
  • SKILL.md is under 500 lines (495)
  • Generation script template compiles (python -m py_compile)
  • Endpoint request/response shape and gpt-image-2 size/background
    constraints verified against OpenRouter and OpenAI documentation
  • No leftover google-genai / GEMINI_API_KEY references in the skill

…-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant