Capability + image lanes: paid requests stop silently changing shape - #134
Merged
Conversation
…age costs tell the truth
Final integrity-campaign slice, all red-proven (24 new-test failures
against reverted sources):
CAPABILITY LANE:
- Silent structured-outputs downgrade: a fetch failure or cache miss
quietly weakened paid requests to json_object. The capability answer
now carries provenance (metadata vs failure-default), warns once per
model, and the adapter logs every downgrade that rests on a default
rather than real metadata.
- Direct-provider namespace miss: the capability map is keyed by
OpenRouter slugs, so bare direct-provider ids could NEVER hit —
structured outputs permanently off for direct OpenAI, parameter checks
permanently fail-open. Lookups now try the documented provider-prefixed
slug; booleans provably flip.
- OpenRouter's real failure shape ("No endpoints found that can handle
the requested parameters" — names no parameter) now gets ONE bounded
retry without require_parameters + a recorded failure, instead of
rebuilding the same failing request forever.
- The ">24h stale" pricing-cache comment described a TTL that did not
exist: now real (serve-stale + deduped background refresh).
IMAGE LANE:
- calculateImageCost precedence was REVERSED vs its docstring (static
table shadowed live billed prices — seedream-4.5 4x off) and unknown
models recorded $0. Live-first now; unknowns log an error and charge
the conservative $0.25 unpriced constant (spend-guard's pattern).
- Steering images were silently ignored by every provider except PiAPI
while metadata recorded them as applied — provenance now records
steeringIgnored honestly and warns loudly.
- The Gemini planner's entire config layer was inert (wrong SDK shape
hidden by an `as any`) — system prompt, schema, JSON mime, temperature
all silently dropped; now typed and active, and the schema-less retry
finally retries without a REAL schema.
- Both Google image calls now have timeouts + SDK abort signals (the
comment claimed the hang class was closed; it was open on both). Bonus
catch from the red-proof run: the guidance wrapper's own text contained
"safety", so a TIMEOUT was misclassified as SAFETY_FILTER — bypassed.
Also carries the consolidated round-two WORKLOG entry + INBOX deferrals
(incl. the chrome-extension keep-or-delete decision for the operator).
tsc clean; full suite 9,030 passed / 0 failed; build green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s now CONSULTED recordParameterFailure taught the cache but nothing read it: every later request for the same model repeated the known-failing call before retrying. Both request builders now consult hasRecordedParameterFailure and omit require_parameters up front (logged). Cache test added; all capability mocks updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
Owner
Author
|
Codex finding adjudicated — real record-but-never-consult: both request builders now gate require_parameters on the learned-failure cache (omitted up front with a log once a model taught us it can't route with it). Full suite green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the integrity campaign's final slice: capability-cache provenance (no more silent structured-output downgrades), the direct-provider namespace fix, bounded require_parameters recovery, a real pricing TTL, honest image-cost precedence (4x discrepancy fixed, $0 unknowns gone), steering provenance, the inert Gemini planner config, and Google-path timeouts. 24 red-proof failures against reverted sources; 9,030 tests green. Carries the consolidated round-two WORKLOG + INBOX.
🤖 Generated with Claude Code
https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi