Skip to content

fix(pumas): consume the Pumas v0.8 additive typed HTTP contract - #125

Open
MrScripty wants to merge 4 commits into
mainfrom
feat/pumas-v080-api
Open

MrScripty wants to merge 4 commits into
mainfrom
feat/pumas-v080-api

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Re-lands #124 on main. #124 was stacked on perf/fast-project-open-20261102 and merged into that branch after #123 had already merged it into main, so these commits never reached main.

Same content as #124:

  • /v1/capabilities and error responses are read additively.
  • /.well-known/pumas is decoded openly, and refusals name the field.
  • The browser vision flow checks that image_to_text is offered rather than a fixed capability count.

Pumas side: MrScripty/Pumas-Library#76 (merged).

🤖 Generated with Claude Code

MrScripty and others added 4 commits November 2, 2026 09:59
Pumas v0.8 (feat/v080-consumer-api, 4c79cd8e) grows typed responses
additively and makes error.outcome authoritative. Tuldok refused valid
responses and misreported refusals.

- Capabilities: validate only the fields, capabilities (chat, image
  generation, image-to-text) and option bounds Tuldok uses; ignore
  context_tokens, multimodal_embedding/decision, new formats, reasons,
  options and fields; select by name; drop list-length caps (1 MiB body
  bound instead).
- Errors: classify by error.outcome, not HTTP status (404/409 are
  ordinary refusals); accept request_id null; keep unknown codes; show
  Pumas' bounded error.message in job/UI errors, capability refusals and
  pumas_error bodies on OpenAI-compatible routes (after redaction).
- Results: ignore additive envelope/result fields.
- Image-to-text: no fixed 2048 max_tokens cap; the live bound follows
  the served context. Image facts are checked only when advertised.
- Model listing prefers GET /v1/served-models (profiles shown), falling
  back to /v1/models on 404.
- Repin the six actual DTO schema exports, source-derived capability
  fixture and source.json to 4c79cd8e; update the consumer contract doc.
  The PR51 advertisement decoder stays closed because it is retained as
  evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ement

The gateway advertisement decoder was closed: any field Pumas added to
the advertisement, or more than 64 entries in an open list, made the
gateway disappear from scans. Required fields are now checked for
presence and type only. Unknown fields are ignored and dropped from the
decoded advertisement, so the stored build observation keeps only the
known fields; list-length caps give way to the 64 KiB body bound.

Missing required fields, wrong types, unsupported schema versions and
malformed endpoints still fail, now as descriptor.Rejected with a
reason naming the field. A gateway scan returns refused advertisements
under `rejected` with their reasons, and the chooser shows them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The vision gateway fixture is projected from the Pumas DTOs, which now
also advertise decision and multimodal_embedding. Pumas responses grow
additively, so the browser flow asserts image_to_text is offered rather
than an exact capability count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0cfbb916-7a3f-4548-93e0-39a948300a89
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

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