Skip to content

fix: remove confidence from rawWriteInterpretationSchema to fix OpenAI 400#80

Merged
MaxLinCode merged 1 commit into
mainfrom
claude/fix-confidence-schema
Apr 5, 2026
Merged

fix: remove confidence from rawWriteInterpretationSchema to fix OpenAI 400#80
MaxLinCode merged 1 commit into
mainfrom
claude/fix-confidence-schema

Conversation

@MaxLinCode

Copy link
Copy Markdown
Owner

Summary

  • Removes confidence field from rawWriteInterpretationSchemaz.record() generates additionalProperties in JSON Schema which OpenAI structured outputs rejects with a 400 ("Extra required key 'confidence' supplied")
  • Defaults confidence to {} in normalizeRawWriteInterpretation so the WriteInterpretation type is still satisfied
  • Changes ?? 0 to ?? 1 in write-commit.ts so fields with no explicit confidence are treated as fully trusted (preserving existing behavior — the LLM was never populating this field)

Test Plan

  • pnpm --filter @atlas/core typecheck — passes
  • pnpm --filter @atlas/core test — 119 tests pass
  • Deploy and confirm the atlas_write_interpretation_output 400 no longer occurs in production

…I structured output 400

z.record() produces additionalProperties in JSON Schema, which OpenAI's structured
outputs rejects — it requires every key in required to appear in properties.
Confidence was never populated by the LLM in practice; unresolvedFields handles
ambiguity instead. Remove confidence from the raw schema, default it to {} in
the normalizer, and default the ?? lookup to 1 (fully trusted) so existing
commit-policy thresholds are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
atlas-web Ignored Ignored Apr 5, 2026 11:09pm

@MaxLinCode MaxLinCode merged commit 3ed04fc into main Apr 5, 2026
2 checks passed
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