Skip to content

feat: add Gemini third-party image provider#373

Open
spiritree wants to merge 1 commit intoop7418:mainfrom
spiritree:feat/gemini-custom
Open

feat: add Gemini third-party image provider#373
spiritree wants to merge 1 commit intoop7418:mainfrom
spiritree:feat/gemini-custom

Conversation

@spiritree
Copy link

摘要

  • 在媒体服务商下新增 Google Gemini (Third-party API) 预设
  • 允许自定义 Gemini 图片服务商配置 Base URL
  • gemini-image provider 的 base_url 传递给 createGoogleGenerativeAI
  • 为 preset 匹配和图片 provider 配置解析补充回归测试

测试计划

  • npm run test
  • CDP:打开 /settings#providers,验证新的媒体服务商卡片已显示
  • CDP:打开连接弹窗,验证存在 Base URLAPI Key 字段
  • CDP:验证 console 中没有 error/warn 报错
image

我自己已经验证第三方兼容gemini API成功,且不影响gemini官方配置

@vercel
Copy link

vercel bot commented Mar 23, 2026

Someone is attempting to deploy a commit to the op7418's projects Team on Vercel.

A member of the Team first needs to authorize it.

@spiritree
Copy link
Author

由于 #123 未合并,我写了个我的版本,希望review下,这个功能刚需

settings/providers:
- add a Google Gemini (Third-party API) media preset and match custom Gemini base URLs back to that preset
- keep official Google Gemini (Image) behavior unchanged for the default Google endpoint

runtime/tests:
- forward gemini-image provider base_url into createGoogleGenerativeAI in image-generator
- add regression tests for preset matching and image provider config resolution
@spiritree spiritree force-pushed the feat/gemini-custom branch from 283df2f to 78c1ae9 Compare March 23, 2026 11:32
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