- 06 Feb, 2026 40 commits
-
-
Stefy Lanza (nextime / spora ) authored
- Add optional tool_call_id field to Message model - Required for tool response messages (role:tool) - Identifies which tool call the response is for - Fixes 400 errors for missing tool_call_id in tool messages
-
Stefy Lanza (nextime / spora ) authored
- Pass autoselect_config to _get_model_selection in handle_autoselect_streaming_request - Fixes TypeError: missing 1 required positional argument - Ensures streaming autoselect requests use the configured selection_model
-
Stefy Lanza (nextime / spora ) authored
- Add optional tool_calls field to Message model - Make content field optional with default None - Allows assistant messages with tool_calls instead of content - Fixes 422 validation errors for tool call messages - Supports OpenAI message format with function calls
-
Stefy Lanza (nextime / spora ) authored
- Import RequestValidationError from fastapi.exceptions - Update exception handler to catch RequestValidationError instead of status code - Add console logging for immediate visibility of validation errors - Log validation error details using exc.errors() method
-
Stefy Lanza (nextime / spora ) authored
- Add exception handler to catch and log validation errors - Log request path, method, headers, and raw body - Log validation error details from FastAPI - Helps diagnose why requests are failing validation
-
Stefy Lanza (nextime / spora ) authored
- Change host from 0.0.0.0 to 127.0.0.1 for improved security - Change port from 8000 to 17765 to match main.py default - Ensures consistency between development and production modes
-
Stefy Lanza (nextime / spora ) authored
- Log raw request body before validation to diagnose 422 errors - Log request headers and path for debugging - Make Message content field more flexible with List type - Helps identify validation issues in incoming requests
-
Stefy Lanza (nextime / spora ) authored
- Set default value for selection_model to 'general' in AutoselectConfig - Maintains backward compatibility with existing configuration files - Prevents 422 errors when loading configs without selection_model field
-
Stefy Lanza (nextime / spora ) authored
- Add selection_model field to AutoselectConfig model - Update _get_model_selection to use autoselect_config.selection_model instead of hardcoded 'general' - Update handle_autoselect_request to log selection_model from config - Update handle_autoselect_streaming_request to log selection_model from config - Allows flexible configuration of which rotation to use for model selection
-
Stefy Lanza (nextime / spora ) authored
- Add selection_model field to specify which rotation to use for model selection - Default value is 'general' rotation - Allows explicit control over which rotation models are available for autoselect - Provides flexibility in configuring autoselect behavior
-
Stefy Lanza (nextime / spora ) authored
- Changed max_retries from 2 to 5 in RotationHandler.handle_rotation_request - Provides more opportunities to find a working model when errors occur - Especially helpful for tool call errors and other transient failures - Improves reliability of rotation and autoselect model selection
-
Stefy Lanza (nextime / spora ) authored
- Add tools and tool_choice fields to ChatCompletionRequest model - Update OpenAIProviderHandler to accept and pass tools/tool_choice parameters - Update handlers to pass tools/tool_choice from request to provider - Treat tool call errors during streaming as provider failures - Record failure and re-raise to trigger retry with next model in rotation - Allows proper tool/function calling support through the proxy - Resolves 'Tool choice is none, but model called a tool' error by retrying with another model
-
Stefy Lanza (nextime / spora ) authored
- Log chunk type and content before serialization attempt - Log chunk type and content when serialization fails - Helps diagnose 'Tool choice is none, but model called a tool' errors - Apply debug logging to both RequestHandler and AutoselectHandler streaming methods
-
Stefy Lanza (nextime / spora ) authored
- Add try-catch around chunk serialization in stream_generator functions - Skip chunks that fail to serialize (e.g., tool calls without tool_choice) - Log warnings for chunk serialization errors - Prevent streaming failures when models attempt tool calls without proper configuration - Apply fix to both RequestHandler and AutoselectHandler streaming methods
-
Stefy Lanza (nextime / spora ) authored
- Add Key Features section to README.md - Describe Rotation Models with weighted load balancing and automatic failover - Describe Autoselect Models with AI-powered content analysis - Update Rotation Endpoints with detailed model descriptions - Update Autoselect Endpoints with detailed model descriptions - Add comprehensive Rotation Models section to DOCUMENTATION.md - Add comprehensive Autoselect Models section to DOCUMENTATION.md - Include example use cases for both rotation and autoselect models - Update overview with key features and capabilities - Document fallback behavior to 'general' when autoselect can't choose a model
-
Stefy Lanza (nextime / spora ) authored
- Update version to 0.3.0 in setup.py, pyproject.toml, and aisbf/__init__.py
-
Stefy Lanza (nextime / spora ) authored
- Update host from 0.0.0.0 to 127.0.0.1 for localhost-only access - Update port from 8000 to 17765 - Update log message to reflect new address
-
Stefy Lanza (nextime / spora ) authored
- Add prominent ABSOLUTELY CRITICAL section emphasizing ONLY output requirement - Explicitly state NO additional text, explanations, or commentary - Add repeated warnings about outputting nothing except the single tag - Clarify that any extra text will cause system failure - Add examples of what NOT to include in response
-
Stefy Lanza (nextime / spora ) authored
- Properly serialize Stream chunks to JSON format - Convert ChatCompletionChunk objects using model_dump() - Apply fix to both RequestHandler and AutoselectHandler streaming methods - Resolves socket.send() exceptions during streaming
-
Stefy Lanza (nextime / spora ) authored
- Fixed AttributeError when stream=True is passed to OpenAI client - Changed return type to Union[Dict, object] to support streaming - Added conditional check to return Stream object for streaming requests - Bumped version to 0.2.7
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Add successful_model variable to track which model actually worked - Update successful_model when request succeeds in retry loop - Log which model was successfully used - Prevents KeyError when trying to access provider_id from selected_model - Ensures proper model tracking across retry attempts
-
Stefy Lanza (nextime / spora ) authored
- Try up to 2 different models when a request fails or times out - Track which models have been tried to avoid repeating failures - Log each attempt with attempt number and model details - Record failures and rate limit providers automatically - Provide detailed error logging for each failed attempt - Return comprehensive error message when all retries are exhausted - Include last error in final error response for debugging
-
Stefy Lanza (nextime / spora ) authored
- Validate that all providers referenced in rotations exist in providers.json - Log visible warnings with !!! CONFIGURATION WARNING !!! markers - Show available providers when a referenced provider is missing - Indicate that missing providers will be skipped during requests - Provide guidance on how to fix the configuration issue - Log successful validation with checkmarks for available providers
-
Stefy Lanza (nextime / spora ) authored
- Check if provider exists in configuration before creating handler - Log error with available providers when provider is not found - Skip providers that don't exist instead of crashing - Prevents AttributeError when rotation references non-existent provider
-
Stefy Lanza (nextime / spora ) authored
- Add GET /api/autoselect endpoint to list all available autoselect configurations - Add POST /api/autoselect/chat/completions endpoint for autoselect chat completions - Model name in request now selects the specific autoselect configuration - Add GET /api/autoselect/models endpoint to list all models across all autoselect configurations - Maintain backward compatibility with existing /api/{provider_id} endpoints - Follows same pattern as rotation endpoints for consistency -
Stefy Lanza (nextime / spora ) authored
- Add GET /api/rotations endpoint to list all available rotations - Add POST /api/rotations/chat/completions endpoint for rotation chat completions - Model name in request now selects the specific rotation (coding, general, etc.) - Add GET /api/rotations/models endpoint to list all models across all rotations - Update root endpoint to show available rotations and autoselect options - Maintain backward compatibility with existing /api/{provider_id} endpoints -
Stefy Lanza (nextime / spora ) authored
Provider State Logging (providers.py): - Add detailed logging when provider failures are recorded - Show failure count and remaining failures before disable - Log provider disable events with cooldown period details - Log provider re-enable events after successful requests - Track and display previous failure counts Autoselect Model Selection Logging (handlers.py): - Add detailed logging for autoselect model selection process - Show available models and their descriptions - Display user prompt information and length - Log AI model selection request and response - Show model validation and fallback logic - Indicate whether selection was AI-selected or fallback - Add logging for both streaming and non-streaming requests - Display final model choice with selection method
-
Stefy Lanza (nextime / spora ) authored
- Add detailed logging for provider scanning process - Show which providers are skipped and why (rate limited/deactivated) - Display model details including weight, rate limit, and provider - Add priority-based selection visualization - Show sorted models by weight in descending order - Indicate whether selection was random or deterministic - Add clear section headers for different stages of selection - Provide final selection summary with all relevant details
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Weight now acts as priority instead of frequency - Higher weight models always take precedence over lower weight models - Random selection only occurs when multiple models have the same highest weight - Providers that are rate limited/deactivated are automatically skipped - Ensures deterministic model selection based on priority
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Add connection health check before making requests - Test Ollama availability with /api/tags endpoint - Improve timeout configuration with separate connect/read/write/pool timeouts - Add logging of available models from Ollama - Provide clear error message if Ollama is not accessible
-
Stefy Lanza (nextime / spora ) authored
- Set timeout to 300 seconds (5 minutes) for total request - Set connect timeout to 60 seconds - This fixes httpx.ReadTimeout errors with Ollama cloud models - Cloud models may take longer to respond than local instances
-
Stefy Lanza (nextime / spora ) authored
- Add explicit stream: False to Ollama requests - Add robust JSON parsing to handle multiple JSON objects in response - Add detailed logging of raw response content for debugging - Parse multiple JSON objects line by line and use the last one - This fixes JSONDecodeError when Ollama returns multiple chunks
-
Stefy Lanza (nextime / spora ) authored
- Add rate_limit field to ProviderConfig model with default value 0.0 - This fixes AttributeError when BaseProviderHandler tries to access rate_limit - The providers.json file already contains rate_limit for all providers
-
Stefy Lanza (nextime / spora ) authored
- Add detailed debug logging throughout the codebase to track model and provider selection - Fix OllamaProviderHandler to accept optional api_key parameter for cloud models - Add logging in main.py, handlers.py, providers.py, and config.py - Add catch-all endpoint for invalid routes with helpful error messages - Create DEBUG_GUIDE.md with comprehensive documentation - Enhance error messages to show available providers/rotations/autoselect Debug logging now shows: - Request path and provider ID - Available configurations - Provider config and handler selection - Model selection process - Rate limiting application - Request/response details This helps diagnose issues with model and provider selection.
-