Repository navigation
fix: restore om-usage HTTP endpoint - #5859
Merged
diegosouzapw merged 2 commits intoJul 2, 2026
Merged
diegosouzapw merged 2 commits into
diegosouzapw merged 2 commits into
Conversation
Restore GET /api/usage/om-usage as a terminal-friendly equivalent of @@om-usage. The route authenticates normal API keys, respects allowUsageCommand, and supports provider/connection selection while preserving the existing usage text format.\n\nTests:\n- DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx/esm --test tests/unit/internal-usage-command.test.ts\n- npx eslint src/lib/usage/internalUsageCommand.ts src/app/api/usage/om-usage/route.ts tests/unit/internal-usage-command.test.ts\n- npm run typecheck:core\n- npm run build\n- Docker build omniroute:restore-om-usage-http-20260701181714\n- Production curl /api/usage/om-usage?provider=claude returned HTTP 200\n\nNote: pre-commit docs-sync currently fails on existing docs/i18n CHANGELOG body size drift unrelated to this change, so this commit bypasses the hook.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…rors Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
diegosouzapw
merged commit Jul 2, 2026
cfb2db8
into
cheaper-inference:release/v3.8.43
3 checks passed
Collaborator
|
Thanks @Witroch4! Solid diagnosis on the dynamic-route shadowing. We completed the authz registration ( |
This was referenced Jul 2, 2026
feat(usage): report usage command quotas as percentages + honor observed provider quota resets
#5874
Merged
Merged
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
Integrated into release/v3.8.43
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.
Summary
GET /api/usage/om-usageas a terminal-friendly HTTP endpoint for the existing@@om-usageself-service command.allowUsageCommandpermission gate used by the in-chat command.Root cause
The app already had the local
@@om-usagecommand, but the HTTP route was missing. Requests to/api/usage/om-usage?provider=claudewere falling through to the dynamic/api/usage/[connectionId]route, soom-usagewas treated as a connection id and returnedConnection not found.Behavior
A valid OmniRoute API key with
allowUsageCommandenabled can now call:The response is
text/plainand returns the same usage/quota text as the local command, without calling an upstream provider.Validation
DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx/esm --test tests/unit/internal-usage-command.test.ts→ 10/10 passingnpx eslint src/lib/usage/internalUsageCommand.ts src/app/api/usage/om-usage/route.ts tests/unit/internal-usage-command.test.ts→ passing/api/usage/om-usage?provider=claudeafter deploy.