The previous formula computed maxPayment from the estimated input length
plus offering.maxContextTokens — but the on-chain offering for some
provider models has maxContextTokens=0, so output cost was 0 and the
posted maxPayment only covered the (under-estimated) input side. The
provider's claimJob then reverted with PaymentTooHigh, leaving the
gateway hung waiting for a PSS job_deliver that never came.
Match the t4t/container homelab gateway: assume both prompt and
completion can be (max_tokens + 1M-token headroom), budget at the full
split rate, let the JobEscrow contract refund the unused portion. The
provider's actual claim is always smaller, so PaymentTooHigh can't fire.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
swagger({ path: '/' }) renders the UI at root but doesn't register the
/json spec route, so the embedded UI loads then 404s on its own spec.
Keep the plugin defaults and bounce / → /swagger instead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Was only building + pushing; swarm kept running the previous image
until someone ran service update --force. Mirror the frontend workflow:
ssh in and `docker stack deploy --resolve-image always` so every main
push rolls out.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Was at /swagger by default. Apex 404 was confusing — there's no other
content on the api host, so make the API docs the default landing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>