- 06 Feb, 2026 35 commits
-
-
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.
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Move cli.py from aisbf/ to root directory to prevent package imports - Update setup.py entry point from aisbf.cli:main to cli:main - Update pyproject.toml to include cli.py as a py-module - Update MANIFEST.in to include cli.py in distribution - Update cli.py to look for aisbf.sh in /usr/local/share/aisbf/ or ~/.local/share/aisbf/ - Add KeyboardInterrupt handler for graceful Ctrl-C exit - Update setup.py data_files to install aisbf.sh in correct directory
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Fixed aisbf script installation and syntax errors - Added aisbf.sh to data_files for pip package distribution - Updated _install_aisbf_script to copy from share directory
-
Stefy Lanza (nextime / spora ) authored
- Added aisbf.sh to data_files so it's included in pip package - Updated _install_aisbf_script to copy from share directory instead of source - This ensures aisbf.sh is available when installing from pip
-
Stefy Lanza (nextime / spora ) authored
- Modified setup.py to copy aisbf.sh instead of generating script - Updated aisbf.sh to install aisbf package in venv - Fixed double braces syntax error in bash script - Added aisbf package to data_files for installation
-
Stefy Lanza (nextime / spora ) authored
- Added logging module with rotating file handlers to main.py - Log files stored in /var/log/aisbf when launched by root - Log files stored in ~/.local/var/log/aisbf when launched by user - Automatic log directory creation if it doesn't exist - Rotating file handlers with 50MB max file size and 5 backup files - Separate log files for general logs (aisbf.log) and error logs (aisbf_error.log) - stdout and stderr output duplicated to rotating log files - Console logging for immediate feedback - Updated aisbf.sh script to redirect output to log files - Updated setup.py to include logging configuration in installed script - Updated CHANGELOG.md with logging feature documentation
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Changed system installation path from /usr/local/share/aisbf to /usr/share/aisbf - Updated aisbf.sh script to dynamically determine correct paths at runtime - Script now checks for /usr/share/aisbf first, then falls back to ~/.local/share/aisbf - Updated setup.py to install script with dynamic path detection - Updated config.py to check for /usr/share/aisbf instead of /usr/local/share/aisbf - Updated AI.PROMPT documentation to reflect new installation paths - Script creates venv in appropriate location based on installation type - Ensures proper main.py location is used regardless of who launches the script
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Add data_files to setup.py for installing main.py, requirements.txt, and JSON configs - Update aisbf script to create venv in share directory if it doesn't exist - Fix pyproject.toml warnings: add dynamic fields, update license format, remove deprecated classifier - Update MANIFEST.in to include pyproject.toml - Remove manual file copying from setup.py (now handled by data_files) - Remove unused imports (shutil, subprocess)
-
Stefy Lanza (nextime / spora ) authored
- Add pyproject.toml for modern packaging configuration - Add MANIFEST.in for package distribution manifest - Add build.sh script for automated package building - Add clean.sh script for cleaning build artifacts - Add PYPI.md with comprehensive PyPI publishing guide - Update setup.py to install main.py to share directory - Update setup.py metadata (license, author email, repository URL) - Update .gitignore to include PyPI build artifacts (*.tar.gz, *.whl) - Update README.md with PyPI installation and build instructions - Update DOCUMENTATION.md with PyPI packaging section - Update AI.PROMPT with PyPI packaging changes - All scripts include proper GPL license headers The package is now ready for PyPI publication with custom install logic intact.
-
- 05 Feb, 2026 5 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
Remove useless endpoints and add kilocode ones See merge request !1
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-