Skip to content

Fix artifact edit reliability and raise output limits#36

Draft
iplusplus-nl wants to merge 1 commit into
mainfrom
agent/fix-artifact-edits-and-output-limits
Draft

Fix artifact edit reliability and raise output limits#36
iplusplus-nl wants to merge 1 commit into
mainfrom
agent/fix-artifact-edits-and-output-limits

Conversation

@iplusplus-nl

Copy link
Copy Markdown
Collaborator

What changed

  • Rebase independent artifact patches that all reference the original source while continuing to reject conflicting overlaps.
  • Ask edit models for atomic, bounded patch batches and disable unnecessary reasoning on OpenRouter-backed edit calls.
  • Surface output-token exhaustion with an actionable message.
  • Use one shared 32,000-token ceiling for Responses, Chat Completions, browser-direct generation, and artifact editing.

Why

Production logs showed two separate failures: one model returned a stale 21st patch after earlier patches changed its larger source context, and another exhausted the managed service's 16,000-token ceiling on hidden reasoning. The former discarded an otherwise usable edit batch; the latter surfaced as a generic 502.

Impact

Artifact edits can safely recover independent original-source patch batches, edit-only calls do not waste their output budget on hidden reasoning, and both ordinary generation and editing can return up to 32,000 tokens.

Validation

  • npm test — 1,208 tests passed
  • npm run build — production TypeScript and Vite build 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