Implement LLM-WP-0008: provider-scoped account balance CLI
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:
parent
c0d5c4ad08
commit
ed7c632155
11 changed files with 783 additions and 14 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue