Skip to content

feat(ai): add Google image generation#37781

Merged
rekram1-node merged 3 commits into
v2from
google-images
Jul 20, 2026
Merged

feat(ai): add Google image generation#37781
rekram1-node merged 3 commits into
v2from
google-images

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Google.configure(...).image(modelID) backed by Gemini generateContent
  • infer open request-scoped Google image options from the selected model, with autocomplete and structural types for known fields plus future string values and arbitrary native fields
  • lower ergonomic image, seed, and thinking fields into generationConfig, while raw native values override aliases and http.body remains the final deep overlay
  • route every selected model ID without local model/provider allowlists or compatibility rejection
  • filter interim thought: true images while preserving ordered candidate/part metadata, signatures, complete raw usage, and no-image diagnostics
  • preserve Google API-key/env auth and merged HTTP headers, query parameters, and body behavior

Tests

  • bun x prettier --check README.md src/protocols/google-images.ts src/providers/google.ts test/image.test.ts test/image.types.ts test/provider/google-images.recorded.test.ts
  • bun typecheck
  • bun run build
  • bun test test/image.test.ts --timeout 30000 (4 passed)
  • RECORDED_PREFIX=google-images bun test test/provider/google-images.recorded.test.ts --timeout 30000 (1 passed)
  • bun test --timeout 30000 --only-failures (382 passed, 29 skipped)
  • git diff --check
  • cassette request-header scan: only content-type; no credential material

Cassette

  • retained the existing Google live cassette because the request wire body is unchanged
  • replay passes without re-recording

Requested by: @rekram1-node (Aiden Cline via Slack)

@rekram1-node
rekram1-node merged commit 8cb9361 into v2 Jul 20, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the google-images branch July 20, 2026 20:12
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 20, 2026
* upstream/v2: (63 commits)
  feat(codemode): add Set method parity (anomalyco#38000)
  fix(core): match dev patch behavior (anomalyco#37709)
  refactor(tui): migrate diff viewer to V2 theme (anomalyco#37999)
  feat(ai): support image-guided generation (anomalyco#37998)
  feat(ai): add Z.ai image generation (anomalyco#37780)
  chore: merge dev into v2 (anomalyco#37996)
  refactor(tui): expose theme colors as properties (anomalyco#37995)
  feat(ai): add Google image generation (anomalyco#37781)
  fix(cli): isolate bun updater cache
  feat(ai): add xAI image generation (anomalyco#37778)
  feat(codemode): add groupBy parity (anomalyco#37992)
  refactor(ai): infer image provider options (anomalyco#37948)
  fix(core): ignore empty provider api keys
  feat(tui): add categorical theme hues (anomalyco#37985)
  refactor(core): inject models options
  refactor(server): inject database options
  fix(tui): make migrated selected background transparent (anomalyco#37967)
  feat(codemode): complete date parity (anomalyco#37960)
  feat(codemode): complete regexp and math parity (anomalyco#37955)
  fix(tui): adapt file badge accent to theme mode (anomalyco#37953)
  ...
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (65 commits)
  refactor(server): inject runtime options
  refactor(server): centralize server options
  feat(codemode): add Set method parity (anomalyco#38000)
  fix(core): match dev patch behavior (anomalyco#37709)
  refactor(tui): migrate diff viewer to V2 theme (anomalyco#37999)
  feat(ai): support image-guided generation (anomalyco#37998)
  feat(ai): add Z.ai image generation (anomalyco#37780)
  chore: merge dev into v2 (anomalyco#37996)
  refactor(tui): expose theme colors as properties (anomalyco#37995)
  feat(ai): add Google image generation (anomalyco#37781)
  fix(cli): isolate bun updater cache
  feat(ai): add xAI image generation (anomalyco#37778)
  feat(codemode): add groupBy parity (anomalyco#37992)
  refactor(ai): infer image provider options (anomalyco#37948)
  fix(core): ignore empty provider api keys
  feat(tui): add categorical theme hues (anomalyco#37985)
  refactor(core): inject models options
  refactor(server): inject database options
  fix(tui): make migrated selected background transparent (anomalyco#37967)
  feat(codemode): complete date parity (anomalyco#37960)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant