fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
"""
|
|
Budget table model.
|
|
|
|
Canonical definition for ``litellm_budgettable``. Re-exported from
|
|
``litellm.proxy._types`` for backwards compatibility.
|
|
"""
|
|
|
|
from datetime import datetime
|
|
from typing import List, Optional
|
|
|
|
from pydantic import ConfigDict
|
|
|
|
from litellm.types.llms.base import LiteLLMPydanticObjectBase
|
|
|
|
|
|
class LiteLLM_BudgetTable(LiteLLMPydanticObjectBase):
|
|
"""Represents user-controllable params for a LiteLLM_BudgetTable record.
|
|
|
|
Budget-write paths use `model_fields.keys()` on this class as an allowlist
|
|
for user input. Keep server-managed fields (e.g. `budget_reset_at`) on
|
|
`LiteLLM_BudgetTableFull` so they aren't user-settable.
|
|
"""
|
|
|
|
budget_id: Optional[str] = None
|
|
soft_budget: Optional[float] = None
|
|
max_budget: Optional[float] = None
|
|
max_parallel_requests: Optional[int] = None
|
|
tpm_limit: Optional[int] = None
|
|
rpm_limit: Optional[int] = None
|
|
model_max_budget: Optional[dict] = None
|
|
budget_duration: Optional[str] = None
|
|
allowed_models: Optional[List[str]] = (
|
|
None # per-member model scope; empty = inherit team models
|
|
)
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
|
class LiteLLM_BudgetTableFull(LiteLLM_BudgetTable):
|
|
"""LiteLLM_BudgetTable + server-managed fields returned on API responses."""
|
|
|
|
budget_reset_at: Optional[datetime] = None
|
|
created_at: datetime
|
|
|
|
|
|
class LiteLLM_TeamMemberTable(LiteLLM_BudgetTable):
|
|
"""
|
|
Used to track spend of a user_id within a team_id
|
|
"""
|
|
|
|
spend: Optional[float] = None
|
|
user_id: Optional[str] = None
|
|
team_id: Optional[str] = None
|
|
budget_id: Optional[str] = None
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|