Implement LLM-WP-0008: provider-scoped account balance CLI
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Add pluggable balance registry, OpenRouter credits/key limit client,
and llm-connect balance with one-shot --provider that does not change
library defaults.
This commit is contained in:
tegwick 2026-08-03 23:49:01 +02:00
parent c0d5c4ad08
commit ed7c632155
11 changed files with 783 additions and 14 deletions

View file

@ -21,8 +21,18 @@ from llm_connect.embedding_adapter import EmbeddingAdapter
from llm_connect.embedding_cache import EmbeddingCache
from llm_connect.embedding_factory import create_embedding_adapter
from llm_connect.embedding_openai import OpenAICompatibleEmbeddingAdapter
from llm_connect.balance import (
AccountBalance,
BalanceClientRegistry,
OpenRouterBalanceClient,
ProviderBalanceClient,
format_balance_human,
get_account_balance,
resolve_balance_provider,
)
from llm_connect.exceptions import (
LLMAPIError,
LLMBalanceUnsupportedError,
LLMBudgetExceededError,
LLMConfigurationError,
LLMError,
@ -103,6 +113,14 @@ __all__ = [
"LLMTimeoutError",
"LLMSubprocessError",
"LLMBudgetExceededError",
"LLMBalanceUnsupportedError",
"AccountBalance",
"BalanceClientRegistry",
"OpenRouterBalanceClient",
"ProviderBalanceClient",
"format_balance_human",
"get_account_balance",
"resolve_balance_provider",
"EmbeddingAdapter",
"OpenAICompatibleEmbeddingAdapter",
"EmbeddingCache",