Uh oh!
There was an error while loading. Please reload this page.
feat(context-dev): add Context.dev to hosted key rotation pool - #5576
Conversation
Wires all 22 context_dev tools into the same hosted-key mechanism as Exa: CONTEXT_DEV_API_KEY_COUNT/1..N rotation, BYOK provider registration, and hideWhenHosted on the block's API key field. Cost is read directly from each response's reported credits_consumed rather than estimated per endpoint.
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview A shared BYOK is extended end-to-end: provider id in types and API contracts, Settings → BYOK under Search & web, and the Context.dev block API key field uses Reviewed by Cursor Bugbot for commit cd882b5. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryThis PR adds Context.dev to the hosted-key and BYOK flow. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "feat(context-dev): add Context.dev to ho..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Jul 10, 2026
waleedlatif1
commented
Jul 10, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit cd882b5. Configure here.
Summary
apps/sim/tools/context_dev/hosting.tsshared helper:CONTEXT_DEV_API_KEYenv prefix (_COUNT+_1..Nrotation),byokProviderId: 'context_dev',per_requestrate limit (60/min)context_dev_*tools wired withhosting: contextDevHosting<...>()credits_consumed(already surfaced asoutput.creditsConsumed) rather than a hardcoded per-endpoint guess — more accurate than static estimates since Context.dev reports real usage per callcontext_devadded toBYOKProviderId,byokProviderIdSchema, and the Settings → BYOK UI (Search & websection, next to Exa/Firecrawl)hideWhenHosted: true— no operation split needed since all 22 ops support hosted keys (unlike Exa, which excludesresearch).env.exampledocumentsCONTEXT_DEV_API_KEY_COUNT/1/2Type of Change
Testing
bun run check:api-validationpassesbunx tsc --noEmitclean on touched files (1 pre-existing unrelated error elsewhere on staging)bunx vitest run tools/context_dev/ tools/index.test.ts blocks/blocks.test.ts— 168/168 passingbun run lintcleanChecklist