Skip to content

BYOK: separate BYOK advisory spend from the free Workers-AI daily neuron budget #672

Description

@JSONbored

Part of #525. From the BYOK security audit.

The BYOK advisory call is estimated and charged against AI_DAILY_NEURON_BUDGET like free Workers AI (src/services/ai-review.ts ~294-302), even though BYOK bills the maintainer's own provider account. This couples a maintainer's own-account spend to the global free budget (BYOK can be blocked by free-tier exhaustion, and BYOK eats free headroom).

Fix: skip (or separately account) the daily-neuron budget for the BYOK advisory leg; budget only the free Workers-AI legs (the consensus pair). Keep the distinct byok:<provider> usage tag but exclude it from sumAiEstimatedNeuronsSince. Test: a BYOK advisory still runs when the free budget is exhausted.

Severity: medium.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions