Skip to content

[Bug]: Fix app spec generation for non claude models that don't have structured output #669

@Shironex

Description

@Shironex

Operating System

macOS

Run Mode

Electron (Desktop App)

App Version

v0.14.0rc

Bug Description

The app spec generation is failing at the last step when its need to return json / structured output in non claude models

Steps to Reproduce

  1. Go to app spec generation view
  2. Regenerate app spec
  3. Regeneration fail for non claude models because they don't have structured output ability like claude sdk

Expected Behavior

For non claude models we should enforce in prompt and use fallback json parsing like in other places

Actual Behavior

Its failing because its trying to use structured output system

Screenshots

Image Image

Relevant Logs

The file is ready to use for project planning and implementation tracking.
ERROR [SpecRegeneration] ❌ parseAndCreateFeatures() failed:
ERROR [SpecRegeneration] Error: Error: No valid JSON found in response
    at parseAndCreateFeatures (/Users/tomer/Projects/automaker/apps/server/src/routes/app-spec/parse-and-create-features.ts:48:13)
    at generateFeaturesFromSpec (/Users/tomer/Projects/automaker/apps/server/src/routes/app-spec/generate-features-from-spec.ts:174:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async generateSpec (/Users/tomer/Projects/automaker/apps/server/src/routes/app-spec/generate-spec.ts:294:7)

Additional Context

Another issue to confirm if the spec generation respect the non claude models properly as in #528 we got report that the create endpoint ignores settingsService - User's configured specGenerationModel is ignored, always defaults to Claude opus

There is already pr that is going to fix it but its seems to not be enough as in feedback its still failing
PR number #622

Issues related

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided all required information above

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingscope: uiUI/UX changes, layout, visual or interaction behavior.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions