Skip to content

fix: accept image generation lifecycle statuses - #6675

Merged
tim-smart merged 2 commits into
Effect-TS:mainfrom
danieljvdm:dan/fix-openai-image-generation-status
Jul 27, 2026
Merged

fix: accept image generation lifecycle statuses#6675
tim-smart merged 2 commits into
Effect-TS:mainfrom
danieljvdm:dan/fix-openai-image-generation-status

Conversation

@danieljvdm

@danieljvdm danieljvdm commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Accept OpenAI image generation-specific generating and failed lifecycle statuses without widening shared message statuses.
  • Align the handwritten response schema with the generated OpenAI schema.
  • Add regression coverage and a patch changeset for @effect/ai-openai.

Validation

  • pnpm lint-fix
  • pnpm test --run packages/ai/openai/test/OpenAiSchema.test.ts
  • pnpm check

Summary by CodeRabbit

  • Bug Fixes
    • OpenAI image generation responses now correctly support lifecycle statuses, including “in progress,” “generating,” “completed,” and “failed.”
    • Image generation results now properly handle nullable outcomes, improving decoding and compatibility for intermediate and failure responses.

@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog Jul 27, 2026
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f339438

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@effect/ai-openai Patch
effect Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-openai-compat Patch
@effect/ai-openrouter Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 83d49472-d11e-4bf9-a3f2-9f139f99ba5b

📥 Commits

Reviewing files that changed from the base of the PR and between ef122ed and f339438.

📒 Files selected for processing (3)
  • .changeset/fresh-images-generate.md
  • packages/ai/openai/src/OpenAiSchema.ts
  • packages/ai/openai/test/OpenAiSchema.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • .changeset/fresh-images-generate.md
  • packages/ai/openai/test/OpenAiSchema.test.ts
  • packages/ai/openai/src/OpenAiSchema.ts

📝 Walkthrough

Walkthrough

The OpenAI image generation call schema now accepts four lifecycle statuses and nullable results. Tests cover decoding generating and failed, and a patch changeset documents the update.

Changes

Image generation status support

Layer / File(s) Summary
Schema status validation and coverage
packages/ai/openai/src/OpenAiSchema.ts, packages/ai/openai/test/OpenAiSchema.test.ts, .changeset/fresh-images-generate.md
The image generation call schema accepts four lifecycle statuses and nullable results, tests verify decoding for generating and failed, and a patch changeset documents the behavior update.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: bug

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@coderabbitai coderabbitai Bot added the bug Something isn't working label Jul 27, 2026
@tim-smart
tim-smart enabled auto-merge (squash) July 27, 2026 22:54
@tim-smart
tim-smart merged commit 4cc95ae into Effect-TS:main Jul 27, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from Discussion Ongoing to Done in PR Backlog Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

File Name Current Size Previous Size Difference
basic.ts 6.63 KB 6.63 KB 0.00 KB (0.00%)
batching.ts 9.37 KB 9.37 KB 0.00 KB (0.00%)
brand.ts 6.26 KB 6.26 KB 0.00 KB (0.00%)
cache.ts 10.12 KB 10.12 KB 0.00 KB (0.00%)
config.ts 19.22 KB 19.22 KB 0.00 KB (0.00%)
differ.ts 18.42 KB 18.42 KB 0.00 KB (0.00%)
http-client.ts 20.76 KB 20.76 KB 0.00 KB (0.00%)
logger.ts 10.28 KB 10.28 KB 0.00 KB (0.00%)
metric.ts 8.55 KB 8.55 KB 0.00 KB (0.00%)
optic.ts 7.41 KB 7.41 KB 0.00 KB (0.00%)
pubsub.ts 14.20 KB 14.20 KB 0.00 KB (0.00%)
queue.ts 11.09 KB 11.09 KB 0.00 KB (0.00%)
schedule.ts 10.27 KB 10.27 KB 0.00 KB (0.00%)
schema-class.ts 18.16 KB 18.16 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 28.02 KB 28.02 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 24.34 KB 24.34 KB 0.00 KB (0.00%)
schema-string-transformation.ts 12.69 KB 12.69 KB 0.00 KB (0.00%)
schema-string.ts 10.35 KB 10.35 KB 0.00 KB (0.00%)
schema-template-literal.ts 14.49 KB 14.49 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 20.93 KB 20.93 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 23.38 KB 23.38 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 18.32 KB 18.32 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 18.00 KB 18.00 KB 0.00 KB (0.00%)
schema-toFormatter.ts 17.88 KB 17.88 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 21.52 KB 21.52 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 18.56 KB 18.56 KB 0.00 KB (0.00%)
schema.ts 17.43 KB 17.43 KB 0.00 KB (0.00%)
stm.ts 12.05 KB 12.05 KB 0.00 KB (0.00%)
stream.ts 9.37 KB 9.37 KB 0.00 KB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants