Skip to content

docs: refactor budgets - #332

Open
sharbuz wants to merge 1 commit into
mainfrom
docs-update-budgets
Open

docs: refactor budgets#332
sharbuz wants to merge 1 commit into
mainfrom
docs-update-budgets

Conversation

@sharbuz

@sharbuz sharbuz commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Update Budget management docs

Testing

  • Tested locally with npm start
  • All pages render correctly
  • Images display properly
  • Internal links work
  • Sidebar navigation works

Quality Checks

  • npm run check passes (typecheck + lint + commitlint)
  • No MDX compilation errors
  • No raw angle brackets (<text> must be `<text>`)
  • Sidebar references document IDs (not filenames)
  • Images stored locally next to content (not in static/img/)
  • Commit messages follow Conventional Commits
  • No secrets or credentials in documentation

@sharbuz
sharbuz requested a review from 8nevil8 July 28, 2026 15:00
@github-actions

Copy link
Copy Markdown

PR Preview Ready!

Your preview documentation is ready! Visit it here:

Preview URL: http://codemie-docs-pr-previews.s3-website.eu-central-1.amazonaws.com/pr-332/


This preview will be automatically updated when you push new commits to this PR.
Preview files will be deleted when the PR is closed or merged.

@sharbuz
sharbuz requested a review from elluvium July 29, 2026 10:58

:::info
Only one budget is charged per request:
Only one budget is charged per request. The category is resolved automatically by request type:

@elluvium elluvium Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by model in request? guess request type is the same for prem/non-prem

- Non-premium model + CLI request → CLI budget
- Non-premium model + UI request → Platform budget
:::
- Premium model → **Premium Models** (regardless of source: UI or CLI)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Premium models are charged to prem budget only for CLI. Opus in UI will be charged via regular platform budget

- Non-premium model + UI request → **Platform**

Category is resolved automatically per request. If a project budget exists for the resolved category, it takes precedence over the user's global budget.
For details on how project membership affects category resolution, see [Budget Priority](#budget-priority).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave initial phrase as is just add a link

│ CLI │ Web UI
▼ ▼
CLI budget Platform budget
<div

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this inline js script if we already have zoom capability for regular images? Especially when it's opens image as blob instead of zooming (and user cannot get back) – blob:http://codemie-docs-pr-previews.s3-website.eu-central-1.amazonaws.com/d7847ba8-0011-4fe7-b91b-378907f0d301

>

```mermaid
flowchart LR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace it as SVG diagram to keep consistency across docs


```mermaid
flowchart LR
A([User request]) --> B{"Premium model?<br/>LITELLM_PREMIUM_MODELS_ALIASES"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is model name in LITELLM_PREMIUM_MODELS_ALIASES backend parameter?

| 8 | All three defaults + personal Premium | ✅ Default Platform | ✅ Default CLI | ✅ Personal Premium |
| # | Budget | Platform request | CLI request | Premium model request |
| --- | ---------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------- |
| 1 | Default: Platform only | ✅ Default Platform (individual counter per user) | ❌ Blocked — no CLI budget | ❌ Blocked — no Premium budget |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this works in this way

| Getting started | Create default budgets for all three categories (Platform, CLI, Premium) — otherwise users without a personal budget will be blocked in uncovered categories |
| Team cost control without blocking individual members | Create a project budget with **Enforce member spend limits = Disabled** — the overall limit is controlled at the team level without blocking individual members |
| Strict per-user control within a project | Enable **Enforce member spend limits** — each member receives a fixed quota with blocking on overspend |
| VIP users / team leads | Use Override with **Enforce member spend limits** enabled to individually increase a specific member's quota |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VIP users?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants