This section contains comprehensive API documentation for all Aurelis components.
from aurelis.core.security import get_api_key_manager
# Set GitHub token
api_key_manager = get_api_key_manager()
api_key_manager.set_api_key("github", "your_github_token")
from aurelis.models import get_model_orchestrator, ModelRequest, ModelType, TaskType
# Create orchestrator
orchestrator = get_model_orchestrator()
# Make request
request = ModelRequest(
prompt="Generate a Python class for user management",
model_type=ModelType.CODESTRAL_2501,
task_type=TaskType.CODE_GENERATION
)
response = await orchestrator.process_request(request)
print(response.content)
from aurelis.core.config import get_config
config = get_config()
print(f"Primary model: {config.primary_model}")
All APIs use structured error handling with custom exception types:
from aurelis.core.exceptions import (
AurelisError,
ModelError,
ConfigurationError,
AuthenticationError
)
try:
response = await orchestrator.process_request(request)
except ModelError as e:
print(f"Model error: {e}")
except AuthenticationError as e:
print(f"Auth error: {e}")
Aurelis uses comprehensive type hints and Pydantic models for all APIs:
from aurelis.models.types import ModelRequest, ModelResponse
from aurelis.core.types import AnalysisResult, CodeIssue
# All parameters and returns are type-safe
def analyze_code(content: str) -> AnalysisResult:
# Implementation...
pass
GitHub model usage is automatically rate-limited according to GitHub’s policies: