Skip to content

feat: enforce runtime guest output token limits - #25

Merged
hcastc00 merged 1 commit into
mainfrom
feat/runtime-guest-output-limit
Nov 16, 2026
Merged

hcastc00 merged 1 commit into
mainfrom
feat/runtime-guest-output-limit

Conversation

@hcastc00

@hcastc00 hcastc00 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Guest chat output limits are currently fixed by GUEST_MAX_OUTPUT_TOKENS at startup. Read account.guest_max_output_tokens from Metering authentication so the limit saved in Admin → Settings → Guest chat applies to subsequent requests.

The gateway uses the runtime value for both the provider request and its token reservation. It keeps the deployment fallback when older Metering responses omit the field; signed-in requests retain their existing behavior.

Validation: go test ./apps/gateway/... ./pkg/... passes, including runtime-response mapping and output-limit tests above and below the deployment fallback.

Deploy this gateway build before relying on runtime output limits in the companion Nexus settings change. It is compatible with the existing Metering response.

Companion admin settings PR: https://github.com/dappnode/dappnode-nexus/pull/163

@hcastc00
hcastc00 merged commit 4d87dbb into main Nov 16, 2026
5 checks 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