Skip to content

Codex/gpt image qwen cliproxyapi - #1557

Merged
shunkakinoki merged 3 commits into
mainfrom
codex/gpt-image-qwen-cliproxyapi
Apr 23, 2026
Merged

Codex/gpt image qwen cliproxyapi#1557
shunkakinoki merged 3 commits into
mainfrom
codex/gpt-image-qwen-cliproxyapi

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 23, 2026

Copy link
Copy Markdown
Owner

Summary by cubic

Adds image generation via gpt-image-2 and a new qwen provider to cliproxyapi. Also introduces provider-specific model overrides in llm-update.sh.

  • New Features

    • Add openai provider with gpt-image-2; map gpt-imagegpt-image-2; add OpenRouter upstream slug openai/gpt-5.4-image-2.
    • Add qwen provider (DashScope compatible) with qwen3.6-plus.
    • Update templates, start.sh, and README to support OPENAI_API_KEY and QWEN_API_KEY (fallback to DASHSCOPE_API_KEY).
    • Add add_model_override in llm-update.sh and tests to replace provider-specific placeholders.
  • Migration

    • Set OPENAI_API_KEY and QWEN_API_KEY (or DASHSCOPE_API_KEY) in your environment.
    • Run scripts/llm-update.sh to regenerate configs.

Written for commit 3968433. Summary will update on new commits.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 23, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@shunkakinoki
shunkakinoki merged commit 9f61a3a into main Apr 23, 2026
25 of 27 checks passed
@shunkakinoki
shunkakinoki deleted the codex/gpt-image-qwen-cliproxyapi branch April 23, 2026 13:53
@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 550f81be-019c-4087-a1f1-49b3717c9d5f

📥 Commits

Reviewing files that changed from the base of the PR and between 6f960df and 3968433.

📒 Files selected for processing (8)
  • config/cliproxyapi/config.template.yaml
  • config/cliproxyapi/config.tpl.yaml
  • home-manager/services/cliproxyapi/README.md
  • home-manager/services/cliproxyapi/scripts/start.sh
  • models.json
  • scripts/llm-update.sh
  • spec/cliproxyapi_spec.sh
  • spec/llm_update_spec.sh

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for GPT image model integration
    • Added Qwen model support via DashScope compatibility
    • New OpenAI provider integration
  • Documentation

    • Updated configuration documentation with new required API keys (OPENAI_API_KEY and QWEN_API_KEY)

Walkthrough

The PR adds dedicated qwen and openai providers to the cliproxyapi configuration, introduces image model mappings (gpt-image-2), implements provider-specific model override logic in the LLM update script, and extends environment variable configuration to support OPENAI_API_KEY and QWEN_API_KEY.

Changes

Cohort / File(s) Summary
Configuration Templates
config/cliproxyapi/config.template.yaml, config/cliproxyapi/config.tpl.yaml
Add dedicated qwen provider (DashScope compatible), openai provider with image model mapping, and image-capable model to openrouter provider. Remove qwen3.6-plus from opencode provider.
Model Mapping & Override System
models.json, scripts/llm-update.sh
Add gpt-imagegpt-image-2 model mapping; introduce add_model_override() helper function to support provider-specific placeholder substitution (e.g., __GPT_IMAGE_OPENROUTER__openai/gpt-5.4-image-2).
Service Setup & Environment
home-manager/services/cliproxyapi/scripts/start.sh, home-manager/services/cliproxyapi/README.md
Extend API key injection with __OPENAI_API_KEY__ and __QWEN_API_KEY__ placeholders; document required OPENAI_API_KEY and QWEN_API_KEY environment variables.
Test Coverage
spec/cliproxyapi_spec.sh, spec/llm_update_spec.sh
Extend cliproxyapi config test to verify openai_api_key and qwen_api_key field generation; add llm-update spec to validate provider-specific model override placeholder resolution and add_model_override function presence.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Through config gardens we did skip,
With providers new—a joyful trip!
Qwen and OpenAI align,
Image models perfectly combine! ✨
Each API key now has its place,
Substitution magic fills the space!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/gpt-image-qwen-cliproxyapi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 23, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Integrates GPT and Qwen image generation capabilities via cliproxyapi within the Codex system.

What changed?

File summaries are not available, but the changes likely involve updates to the codex configuration and cliproxyapi integration to support image generation features from GPT and Qwen models.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for OpenAI and Qwen providers to the CLI proxy API, updating configuration templates, environment variable handling, and model mappings. It also introduces a mechanism for provider-specific model overrides in the update script. Review feedback suggests centralizing these overrides within the models.json file to avoid maintaining multiple sources of truth and to prevent hardcoded model slugs from becoming stale.

Comment thread scripts/llm-update.sh
Comment on lines +28 to +34
add_model_override() {
local key="$1"
local suffix="$2"
local value="$3"
local placeholder="__$(echo "${key}-${suffix}" | tr 'a-z-' 'A-Z_')__"
sed_args+=(-e "s|${placeholder}|${value}|g")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The introduction of add_model_override creates a second source of truth for model versions outside of models.json. This makes maintenance harder as model updates now require changes in both the JSON file and this script.

Consider moving provider-specific model names directly into models.json (e.g., using a key like gpt-image-openrouter). The existing loop in this script will automatically generate the corresponding __GPT_IMAGE_OPENROUTER__ placeholder, allowing you to remove this function entirely.

Comment thread scripts/llm-update.sh

# Provider-specific upstream slugs that intentionally differ from the canonical
# alias stored in models.json.
add_model_override "gpt-image" "openrouter" "openai/gpt-5.4-image-2"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding the upstream model slug openai/gpt-5.4-image-2 here bypasses the centralized model management provided by models.json. If the model version is updated in models.json, this hardcoded string will likely become stale or inconsistent.

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