René's URL Explorer Experiment


Title: feat(tools): queue hosted-key tool calls instead of failing with 429 by TheodoreSpeaks · Pull Request #4416 · simstudioai/sim · GitHub

Open Graph Title: feat(tools): queue hosted-key tool calls instead of failing with 429 by TheodoreSpeaks · Pull Request #4416 · simstudioai/sim

X Title: feat(tools): queue hosted-key tool calls instead of failing with 429 by TheodoreSpeaks · Pull Request #4416 · simstudioai/sim

Description: Summary Hosted-key tool calls (Sim-provided keys, not BYOK) now enqueue onto a per-workspace+provider FIFO queue. Only the head of the queue consumes from the token bucket — strict ordering, no racing. Different workspaces have independent queues. BYOK paths short-circuit before any of this and are unaffected. Total wait (queue position + bucket refill) capped at 5 minutes; over the cap returns the existing 429 result. Crash-tolerant: each ticket has a heartbeat key (TTL 30s, refreshed every 10s while waiting). Dead heads are reaped lazily by the next caller. Queue list TTL is 10 minutes for fully abandoned queues. One Lua script per poll (reap + head-check + self-presence-check atomic) keeps Redis traffic low under contention. Bump Exa search hosted RPM from 5 → 60. New telemetry: platform.hosted_key.queue_waited (with queuePosition field) and platform.hosted_key.queue_wait_exceeded. Type of Change New feature Testing 39 hosted-key tests pass (15 queue + 24 rate-limiter, including FIFO ordering, head-only consume, dead-head reap, cap-exceeded, missing-ticket fall-through) 141/141 across rate-limiter + tools regression Manually verified in dev: depth, head rotation, heartbeat refresh, drain rate match the bucket config bun run lint clean bun run check:api-validation:strict passes Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Hosted-key tool calls (Sim-provided keys, not BYOK) now enqueue onto a per-workspace+provider FIFO queue. Only the head of the queue consumes from the token bucket — strict ordering, no ra...

X Description: Summary Hosted-key tool calls (Sim-provided keys, not BYOK) now enqueue onto a per-workspace+provider FIFO queue. Only the head of the queue consumes from the token bucket — strict ordering, no ra...

Opengraph URL: https://github.com/simstudioai/sim/pull/4416

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9777a5fb-04d8-825f-a724-bc5663c978dc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBE2E:2A369:915DA7:CEDE3A:6AFB51B0
html-safe-nonce6b32ff3407fef9f98204fd5ebb38ad33e07e032c1144ca6b867e408d5e2f03ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTJFOjJBMzY5OjkxNURBNzpDRURFM0E6NkFGQjUxQjAiLCJ2aXNpdG9yX2lkIjoiMzkyMjY3NDQ0NzMzNjI5Njg4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca1bbd7b1dd50de316ec498bd81522c8f78efac5097bfb61a6f00a19010da397e
hovercard-subject-tagpull_request:3619106181
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4416/files
twitter:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
og:image:altSummary Hosted-key tool calls (Sim-provided keys, not BYOK) now enqueue onto a per-workspace+provider FIFO queue. Only the head of the queue consumes from the token bucket — strict ordering, no ra...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/4416/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4416%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4416%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/4416/files
Reloadhttps://github.com/simstudioai/sim/pull/4416/files
Reloadhttps://github.com/simstudioai/sim/pull/4416/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
TheodoreSpeakshttps://github.com/TheodoreSpeaks
staginghttps://github.com/simstudioai/sim/tree/staging
feat/queued-hosted-keyhttps://github.com/simstudioai/sim/tree/feat/queued-hosted-key
Conversation 12 https://github.com/simstudioai/sim/pull/4416
Commits 4 https://github.com/simstudioai/sim/pull/4416/commits
Checks 12 https://github.com/simstudioai/sim/pull/4416/checks
Files changed https://github.com/simstudioai/sim/pull/4416/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4416/files
feat(tools): queue hosted-key tool calls instead of failing with 429 https://github.com/simstudioai/sim/pull/4416/files#top
Show all changes 4 commits https://github.com/simstudioai/sim/pull/4416/files
d7a6339 Add queueing for hosted keys TheodoreSpeaks May 3, 2026 https://github.com/simstudioai/sim/pull/4416/commits/d7a6339068db59a782182127582433103d3de080
0b80ed3 feat(rate-limiter): FIFO queue for hosted-key per-workspace fairness TheodoreSpeaks May 5, 2026 https://github.com/simstudioai/sim/pull/4416/commits/0b80ed34732d27c974ac943a0c41354ebb5708e7
71cb2c0 fix(rate-limiter): bound hosted-key queue wait to execution budget; f… TheodoreSpeaks May 26, 2026 https://github.com/simstudioai/sim/pull/4416/commits/71cb2c0a94dcdadf522367bc0136d068d8836dca
d4f49b3 feat(rate-limiter): make hosted-key queue waits abort-interruptible TheodoreSpeaks May 26, 2026 https://github.com/simstudioai/sim/pull/4416/commits/d4f49b314f87725b7fa1b7f30f639874a8e41f64
Clear filters https://github.com/simstudioai/sim/pull/4416/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4416/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4416/files
hosted-key-rate-limiter.test.ts https://github.com/simstudioai/sim/pull/4416/files#diff-766f97c4d7b817db8c703a55f0a6074f0d4111c6f7ef948e003de21a6170fc71
hosted-key-rate-limiter.ts https://github.com/simstudioai/sim/pull/4416/files#diff-50012c98ac0631c1a2f4437ea8fcc3795ec93da3d6cffba26bea478e5e381056
queue.test.ts https://github.com/simstudioai/sim/pull/4416/files#diff-bf7783727fb8851cf9c9007f710d65532849c49a31fd02819bc76aecde2c8e17
queue.ts https://github.com/simstudioai/sim/pull/4416/files#diff-607aee0c0a593b843cdf8dcc18df3fab77f404e4661b651c5bc63a4855964a68
telemetry.ts https://github.com/simstudioai/sim/pull/4416/files#diff-b6d17cfa996a9ffe9ab97114d9a34ac43f062bbce9351a8445a7ee778b9db2a4
search.ts https://github.com/simstudioai/sim/pull/4416/files#diff-6c7f78ed86865e008b2109856e52e16b86a69cf62bb2f47618c7de77b0e16af1
index.ts https://github.com/simstudioai/sim/pull/4416/files#diff-47ae0066fea628681d98d136239929a240a55aaf3d99ef293c83b3eca7e197c1
Please reload this pagehttps://github.com/simstudioai/sim/pull/4416/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4416/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.