Skip to content

fix_bot_issue: tolerate model_specs emitted as an array - #1131

Open
Erin McNulty (erin2722) wants to merge 1 commit into
mainfrom
fix/bot-issue-model-specs-array
Open

fix_bot_issue: tolerate model_specs emitted as an array#1131
Erin McNulty (erin2722) wants to merge 1 commit into
mainfrom
fix/bot-issue-model-specs-array

Conversation

@erin2722

Copy link
Copy Markdown
Contributor

The gap-audit agent is instructed to emit model_specs as a record keyed by model id, but it sometimes deviates and emits an array of { id, ...spec } objects (e.g. issue #1117). The strict z.record(partialModelSchema) rejected that, so parseIssueMetadata discarded ALL metadata and the resolver bailed with "did not contain parseable bot metadata", labeling the issue autofix-blocked.

Add a normalizeModelSpecs preprocess that converts the array form back into the documented record (keyed by each item's id, stripping id), leaving record inputs untouched. Record consumers
(model_specs?.[targetModel]) are unchanged.

The gap-audit agent is instructed to emit `model_specs` as a record keyed
by model id, but it sometimes deviates and emits an array of
`{ id, ...spec }` objects (e.g. issue #1117). The strict
`z.record(partialModelSchema)` rejected that, so `parseIssueMetadata`
discarded ALL metadata and the resolver bailed with "did not contain
parseable bot metadata", labeling the issue `autofix-blocked`.

Add a `normalizeModelSpecs` preprocess that converts the array form back
into the documented record (keyed by each item's `id`, stripping `id`),
leaving record inputs untouched. Record consumers
(`model_specs?.[targetModel]`) are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview Aug 19, 2026 7:06pm

Request Review

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