Browse Source
Image generation settings arrive at /api/generate as top-level aspectRatio and resolution fields, but the NewApiWG provider path only forwarded model-specific parameters. Native NewApiWG Gemini image generation therefore fell back to default imageConfig values and ignored composer/control-panel ratio choices. The route now merges top-level image settings into provider parameters while preserving explicit model parameter overrides. Constraint: NewApiWG provider implementations read aspect ratio and image size from GenerationInput.parameters. Rejected: Parse aspect ratio from prompt text | UI settings should be authoritative and prompts are ambiguous. Confidence: high Scope-risk: narrow Directive: Keep top-level GenerateRequest image settings and provider parameters in sync for image providers. Tested: npm test -- --run src/app/api/generate/__tests__/route.test.ts src/store/execution/__tests__/nanoBananaExecutor.test.ts src/components/__tests__/GenerationComposer.test.tsx Tested: npx tsc --noEmit --pretty false filtered to generate route files Not-tested: Full tsc due existing test mock overload errors in route.test.tsfeature/canvas-chatbot-copilot
2 changed files with 72 additions and 1 deletions
Loading…
Reference in new issue