CellSem LLM Client
Contents
Installation
Requirements
Quick Installation
Using uv (Recommended)
Using pip
Environment Setup
Verify Installation
Development Installation
Docker Installation (Optional)
Troubleshooting
Common Issues
Getting Help
Quick Start Guide
Basic Usage
Creating Agents
Simple Queries
Custom Configuration
Working with System Messages
Provider-Specific Features
OpenAI Models
Anthropic Models
Advanced Usage
Direct LiteLLM Integration
Environment-Based Configuration
Best Practices
Error Handling
Cost Optimization
Cost Tracking
Testing and Development
Example Applications
Content Generation
Code Analysis
Data Analysis
Next Steps
Schema Enforcement (JSON-First)
Core Concepts
Quick Example (JSON-First)
Schema Inputs
Under the Hood
Notes
Cost Tracking and Estimation
Estimated Costs (Per Request)
Actual Usage (Key-Level)
Rates and Updates
Contributing
Development Philosophy
Getting Started
1. Fork and Clone
2. Set Up Development Environment
3. Configure Environment
Development Workflow
Branch Strategy
TDD Cycle
Testing Strategy
Code Quality Standards
Contributing Guidelines
1. Documentation
2. Commit Messages
3. Pull Request Process
PR Template
Development Commands
Core Commands
Pre-commit Hooks
Architecture Guidelines
Adding New Features
Code Organization
Design Principles
Getting Help
Recognition
API Reference
cellsem_llm_client
Submodules
cellsem_llm_client.advisors
cellsem_llm_client.agents
cellsem_llm_client.exceptions
cellsem_llm_client.files
cellsem_llm_client.schema
cellsem_llm_client.tools
cellsem_llm_client.tracking
cellsem_llm_client.utils
CellSem LLM Client
Index
Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
I
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
U
|
V
_
_rate_database (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator attribute)
A
access_date (cellsem_llm_client.tracking.cost_calculator.RateSource attribute)
actual_cost_usd (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
AdapterCapability (class in cellsem_llm_client.schema.adapters)
add_model_rates() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
age (cellsem_llm_client.tracking.cost_calculator.RateSource property)
AgentConnection (class in cellsem_llm_client.agents.agent_connection)
anthropic_api_key (cellsem_llm_client.tracking.api_trackers.ApiCostTracker attribute)
AnthropicAgent (class in cellsem_llm_client.agents.agent_connection)
AnthropicSchemaAdapter (class in cellsem_llm_client.schema.adapters)
AnthropicUsageReport (class in cellsem_llm_client.tracking.api_trackers)
ApiCostTracker (class in cellsem_llm_client.tracking.api_trackers)
apply_schema() (cellsem_llm_client.schema.adapters.AnthropicSchemaAdapter method)
(cellsem_llm_client.schema.adapters.BaseSchemaAdapter method)
(cellsem_llm_client.schema.adapters.FallbackSchemaAdapter method)
(cellsem_llm_client.schema.adapters.OpenAISchemaAdapter method)
B
BaseSchemaAdapter (class in cellsem_llm_client.schema.adapters)
build_ols4_search_tool() (in module cellsem_llm_client.tools.ols_mcp)
C
cached_cost_per_1k_tokens (cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
cached_tokens (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
calculate_cost() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
cellsem_llm_client
module
cellsem_llm_client.advisors
module
cellsem_llm_client.advisors.benchmarks
module
cellsem_llm_client.advisors.complexity_analyzer
module
cellsem_llm_client.advisors.model_advisor
module
cellsem_llm_client.agents
module
cellsem_llm_client.agents.agent_connection
module
cellsem_llm_client.exceptions
module
cellsem_llm_client.files
module
cellsem_llm_client.files.capabilities
module
cellsem_llm_client.files.processors
module
cellsem_llm_client.schema
module
cellsem_llm_client.schema.adapters
module
cellsem_llm_client.schema.manager
module
cellsem_llm_client.schema.validators
module
cellsem_llm_client.tools
module
cellsem_llm_client.tools.mcp_source
module
cellsem_llm_client.tools.ols_mcp
module
cellsem_llm_client.tools.tool
module
cellsem_llm_client.tracking
module
cellsem_llm_client.tracking.api_trackers
module
cellsem_llm_client.tracking.cost_calculator
module
cellsem_llm_client.tracking.rate_database
module
cellsem_llm_client.tracking.usage_metrics
module
cellsem_llm_client.utils
module
cellsem_llm_client.utils.config
module
CellSemLLMException
config_key (cellsem_llm_client.exceptions.ConfigurationException attribute)
config_value (cellsem_llm_client.exceptions.ConfigurationException attribute)
ConfigurationException
cost (cellsem_llm_client.tracking.usage_metrics.UsageMetrics property)
cost_source (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
CostCalculationException
create_anthropic_agent() (in module cellsem_llm_client.utils.config)
create_litellm_agent() (in module cellsem_llm_client.utils.config)
create_openai_agent() (in module cellsem_llm_client.utils.config)
D
data (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport attribute)
(cellsem_llm_client.tracking.api_trackers.OpenAIUsageReport attribute)
E
estimated_cost_usd (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
F
FallbackCostCalculator (class in cellsem_llm_client.tracking.cost_calculator)
FallbackSchemaAdapter (class in cellsem_llm_client.schema.adapters)
G
get_adapter() (cellsem_llm_client.schema.adapters.SchemaAdapterFactory method)
get_anthropic_usage() (cellsem_llm_client.tracking.api_trackers.ApiCostTracker method)
get_available_providers() (in module cellsem_llm_client.utils.config)
get_capabilities() (cellsem_llm_client.schema.adapters.AnthropicSchemaAdapter method)
(cellsem_llm_client.schema.adapters.BaseSchemaAdapter method)
(cellsem_llm_client.schema.adapters.FallbackSchemaAdapter method)
(cellsem_llm_client.schema.adapters.OpenAISchemaAdapter method)
(cellsem_llm_client.schema.adapters.SchemaAdapterFactory method)
get_default_models() (in module cellsem_llm_client.utils.config)
get_model_rates() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
get_openai_usage() (cellsem_llm_client.tracking.api_trackers.ApiCostTracker method)
get_pydantic_model() (cellsem_llm_client.schema.manager.SchemaManager method)
get_recent_usage() (cellsem_llm_client.tracking.api_trackers.ApiCostTracker method)
get_stale_rates() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
I
input_cost_per_1k_tokens (cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
input_tokens (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
is_stale (cellsem_llm_client.tracking.cost_calculator.RateSource property)
L
list_available_schemas() (cellsem_llm_client.schema.manager.SchemaManager method)
LiteLLMAgent (class in cellsem_llm_client.agents.agent_connection)
load_default_rates() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
load_environment() (in module cellsem_llm_client.utils.config)
load_schema() (cellsem_llm_client.schema.manager.SchemaManager method)
load_schema_from_url() (cellsem_llm_client.schema.manager.SchemaManager method)
M
MCPToolSource (class in cellsem_llm_client.tools.mcp_source)
model (cellsem_llm_client.exceptions.CostCalculationException attribute)
(cellsem_llm_client.exceptions.ProviderException attribute)
(cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
(cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
ModelCostData (class in cellsem_llm_client.tracking.cost_calculator)
module
cellsem_llm_client
cellsem_llm_client.advisors
cellsem_llm_client.advisors.benchmarks
cellsem_llm_client.advisors.complexity_analyzer
cellsem_llm_client.advisors.model_advisor
cellsem_llm_client.agents
cellsem_llm_client.agents.agent_connection
cellsem_llm_client.exceptions
cellsem_llm_client.files
cellsem_llm_client.files.capabilities
cellsem_llm_client.files.processors
cellsem_llm_client.schema
cellsem_llm_client.schema.adapters
cellsem_llm_client.schema.manager
cellsem_llm_client.schema.validators
cellsem_llm_client.tools
cellsem_llm_client.tools.mcp_source
cellsem_llm_client.tools.ols_mcp
cellsem_llm_client.tools.tool
cellsem_llm_client.tracking
cellsem_llm_client.tracking.api_trackers
cellsem_llm_client.tracking.cost_calculator
cellsem_llm_client.tracking.rate_database
cellsem_llm_client.tracking.usage_metrics
cellsem_llm_client.utils
cellsem_llm_client.utils.config
N
name (cellsem_llm_client.tracking.cost_calculator.RateSource attribute)
O
openai_api_key (cellsem_llm_client.tracking.api_trackers.ApiCostTracker attribute)
OpenAIAgent (class in cellsem_llm_client.agents.agent_connection)
OpenAISchemaAdapter (class in cellsem_llm_client.schema.adapters)
OpenAIUsageReport (class in cellsem_llm_client.tracking.api_trackers)
original_error (cellsem_llm_client.exceptions.ProviderException attribute)
output_cost_per_1k_tokens (cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
output_tokens (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
P
provider (cellsem_llm_client.exceptions.CostCalculationException attribute)
(cellsem_llm_client.exceptions.ProviderException attribute)
(cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
(cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
ProviderException
Q
query() (cellsem_llm_client.agents.agent_connection.AgentConnection method)
(cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
query_unified() (cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
query_with_schema() (cellsem_llm_client.agents.agent_connection.AgentConnection method)
(cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
query_with_schema_and_tracking() (cellsem_llm_client.agents.agent_connection.AgentConnection method)
(cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
query_with_tools() (cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
query_with_tracking() (cellsem_llm_client.agents.agent_connection.AgentConnection method)
(cellsem_llm_client.agents.agent_connection.LiteLLMAgent method)
QueryResult (class in cellsem_llm_client.agents.agent_connection)
R
RateSource (class in cellsem_llm_client.tracking.cost_calculator)
register_schema() (cellsem_llm_client.schema.manager.SchemaManager method)
requires_post_processing() (cellsem_llm_client.schema.adapters.BaseSchemaAdapter method)
response_text (cellsem_llm_client.exceptions.SchemaValidationException attribute)
S
schema (cellsem_llm_client.exceptions.SchemaValidationException attribute)
SchemaAdapterFactory (class in cellsem_llm_client.schema.adapters)
SchemaManager (class in cellsem_llm_client.schema.manager)
SchemaNotFoundError
SchemaValidationError
SchemaValidationException
SchemaValidationResult (class in cellsem_llm_client.schema.validators)
SchemaValidator (class in cellsem_llm_client.schema.validators)
set_custom_retry_handler() (cellsem_llm_client.schema.validators.SchemaValidator method)
source (cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
supports_native_schema() (cellsem_llm_client.schema.adapters.AnthropicSchemaAdapter method)
(cellsem_llm_client.schema.adapters.BaseSchemaAdapter method)
(cellsem_llm_client.schema.adapters.FallbackSchemaAdapter method)
(cellsem_llm_client.schema.adapters.OpenAISchemaAdapter method)
T
thinking_cost_per_1k_tokens (cellsem_llm_client.tracking.cost_calculator.ModelCostData attribute)
thinking_tokens (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
timestamp (cellsem_llm_client.tracking.usage_metrics.UsageMetrics attribute)
to_litellm_schema() (cellsem_llm_client.tools.tool.Tool method)
Tool (class in cellsem_llm_client.tools.tool)
tools (cellsem_llm_client.tools.mcp_source.MCPToolSource property)
total_cost_usd (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport property)
total_input_tokens (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport property)
(cellsem_llm_client.tracking.api_trackers.OpenAIUsageReport property)
total_output_tokens (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport property)
(cellsem_llm_client.tracking.api_trackers.OpenAIUsageReport property)
total_requests (cellsem_llm_client.tracking.api_trackers.OpenAIUsageReport property)
total_thinking_tokens (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport property)
total_tokens (cellsem_llm_client.tracking.api_trackers.AnthropicUsageReport property)
(cellsem_llm_client.tracking.api_trackers.OpenAIUsageReport property)
(cellsem_llm_client.tracking.usage_metrics.UsageMetrics property)
U
unpack_tools() (in module cellsem_llm_client.tools.tool)
update_rates_from_source() (cellsem_llm_client.tracking.cost_calculator.FallbackCostCalculator method)
url (cellsem_llm_client.tracking.cost_calculator.RateSource attribute)
usage_metrics (cellsem_llm_client.exceptions.CostCalculationException attribute)
UsageMetrics (class in cellsem_llm_client.tracking.usage_metrics)
UsageReportError
V
validate_optional_costs() (cellsem_llm_client.tracking.cost_calculator.ModelCostData class method)
validate_required_costs() (cellsem_llm_client.tracking.cost_calculator.ModelCostData class method)
validate_response() (cellsem_llm_client.schema.validators.SchemaValidator method)
validate_with_retry() (cellsem_llm_client.schema.validators.SchemaValidator method)
validation_errors (cellsem_llm_client.exceptions.SchemaValidationException attribute)
ValidationStrategy (class in cellsem_llm_client.schema.validators)