openclaw/.github
Chris Zhang c3bfd328ad
feat(litellm): add image generation provider (#70246)
* feat(litellm): add image generation provider

Registers litellm as an image-generation provider so model refs like
litellm/gpt-image-2 route through the LiteLLM proxy, and
agents.defaults.imageGenerationModel.fallbacks entries of the form
litellm/... resolve without "No image-generation provider registered
for litellm" errors.

Implementation uses the OpenAI-compatible /images/generations and
/images/edits endpoints that LiteLLM proxies for. BaseUrl resolves from
models.providers.litellm.baseUrl (default http://localhost:4000). Private
network is auto-allowed when baseUrl is a loopback/RFC1918 address, which
covers the common self-hosted LiteLLM proxy case without needing
OPENCLAW_PROVIDER_ALLOW_PRIVATE_NETWORK. Public baseUrls keep normal SSRF
defaults.

Default model is gpt-image-2 (matching upstream 4.21+ OpenAI default).
Advertises the same 2K/4K sizes OpenAI now exposes, plus legacy
256/512/1024 for dall-e-3. Supports both generate and edit.

Local patch. LiteLLM has no upstream image-generation support yet; revisit
if upstream adds one.

* ci: rerun after upstream main hot-fix

* fix(litellm): harden image generation provider

---------

Co-authored-by: Chris Zhang <chris@ChrisdeMac-mini.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-25 19:06:51 +01:00
..
actions ci: save pnpm store cache explicitly 2026-04-23 11:09:37 +01:00
codeql CI: trim CodeQL JavaScript scope (#71347) 2026-04-25 09:57:12 +08:00
codex/prompts ci: throttle docs agent workflow 2026-04-24 00:27:01 +01:00
instructions perf: speed local checks and warm builds 2026-04-20 15:08:41 +01:00
ISSUE_TEMPLATE docs: add beta blocker contributor guidance (#55199) 2026-03-26 09:31:59 -05:00
workflows ci: relax bundled channel fast smoke timeout 2026-04-25 06:31:39 +01:00
actionlint.yaml ci: register blacksmith macos runner labels 2026-04-16 19:58:08 +01:00
CODEOWNERS Security: add secops ownership for sensitive paths (#46440) 2026-03-14 14:16:14 -07:00
dependabot.yml Fix npm global install deprecation warnings (#28318) 2026-02-27 07:38:02 -08:00
labeler.yml feat(litellm): add image generation provider (#70246) 2026-04-25 19:06:51 +01:00
pull_request_template.md docs: trim PR template root-cause boilerplate 2026-04-03 18:08:55 -05:00