fix(api): fix addon invocation completion and rate limit UX#113
Merged
fix(api): fix addon invocation completion and rate limit UX#113
Conversation
- Auto-complete invocations by default (opt-in to async with X-TMI-Callback header) - Increase default max active invocations from 1 to 3 - Add detailed 429 response with blocking invocation info and Retry-After header - Auto-infer server base URL for callback URLs if not configured - Update addon and webhook documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Fixes addon invocation issues where users get 429 errors because invocations never complete:
X-TMI-Callback: asyncheaderChanges
internal/config/config.goBaseURLfield withGetBaseURL()auto-inferenceapi/addon_invocation_worker.goapi/addon_invocation_quota_store.goDefaultMaxActiveInvocationsfrom 1 to 3api/addon_invocation_store.goListActiveForUserinterface and Redis implementationapi/addon_rate_limiter.goblocking_invocationsarrayapi/request_utils.goRetry-Afterheader for 429 responsescmd/server/main.godocs/developer/addons/addon-development-guide.mdBehavior Changes
X-TMI-Callback: async, invocation is markedcompletedblocking_invocations[]with invocation IDs, addon IDs, status, expiry timesretry_afterseconds until oldest invocation times outRetry-AfterHTTP header per RFC 6585interface,port, andtls_enabledif not setTest plan
make lint- 0 issuesmake build-server- SUCCESSmake test-unit- All passed🤖 Generated with Claude Code