1. 06 Feb, 2026 30 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Bump version to 0.2.5 · e1743674
      Stefy Lanza (nextime / spora ) authored
      e1743674
    • Stefy Lanza (nextime / spora )'s avatar
      Fix KeyError when successful model is not updated after retry · c02b723f
      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
      c02b723f
    • Stefy Lanza (nextime / spora )'s avatar
      Add retry logic for rotation requests on failure or timeout · 02d66b50
      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
      02d66b50
    • Stefy Lanza (nextime / spora )'s avatar
      Add validation warnings when loading rotations.json · 0470bf4b
      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
      0470bf4b
    • Stefy Lanza (nextime / spora )'s avatar
      Add error handling for missing providers in rotation configuration · fbfab4ba
      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
      fbfab4ba
    • Stefy Lanza (nextime / spora )'s avatar
      Add new autoselect API endpoints at /api/autoselect · 1545c2cc
      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
      1545c2cc
    • Stefy Lanza (nextime / spora )'s avatar
      Add new rotation API endpoints at /api/rotations · 9f5592c4
      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
      9f5592c4
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive debug logging for provider state and autoselect model selection · 3ffc2bcf
      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
      3ffc2bcf
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive debug logging for rotation model selection · 684dc1f0
      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
      684dc1f0
    • Stefy Lanza (nextime / spora )'s avatar
      Bump version to 0.2.4 · 963f3fc3
      Stefy Lanza (nextime / spora ) authored
      963f3fc3
    • Stefy Lanza (nextime / spora )'s avatar
      Change rotation model selection from frequency-based to priority-based · 706aab11
      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
      706aab11
    • Stefy Lanza (nextime / spora )'s avatar
      Bump version · e7446a90
      Stefy Lanza (nextime / spora ) authored
      e7446a90
    • Stefy Lanza (nextime / spora )'s avatar
      Add Ollama health check and improve timeout configuration · bd556776
      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
      bd556776
    • Stefy Lanza (nextime / spora )'s avatar
      Increase Ollama request timeout to handle slow cloud models · 6de38561
      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
      6de38561
    • Stefy Lanza (nextime / spora )'s avatar
      Fix Ollama response parsing for multiple JSON objects · 0cb155b5
      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
      0cb155b5
    • Stefy Lanza (nextime / spora )'s avatar
      Fix ProviderConfig to include rate_limit field · fa2ef57c
      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
      fa2ef57c
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive debug logging and fix Ollama provider handler · c99aa5ba
      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.
      c99aa5ba
    • Stefy Lanza (nextime / spora )'s avatar
      Autoselect models · 2089e9b6
      Stefy Lanza (nextime / spora ) authored
      2089e9b6
    • Stefy Lanza (nextime / spora )'s avatar
      Fix entry point to avoid importing aisbf package dependencies · e423dbc3
      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
      e423dbc3
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Bump version to 0.2.0 · 649ea98e
      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
      649ea98e
    • Stefy Lanza (nextime / spora )'s avatar
      Add aisbf.sh to data_files for pip package distribution · 1ab153c5
      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
      1ab153c5
    • Stefy Lanza (nextime / spora )'s avatar
      Fix aisbf script installation and syntax errors · f421664b
      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
      f421664b
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive logging module with rotating file handlers · 3975f23b
      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
      3975f23b
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Update installation paths and script logic for proper system-wide and user installations · 2d9ccd61
      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
      2d9ccd61
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Update pip package to create share directory and copy files · ba4dbae1
      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)
      ba4dbae1
    • Stefy Lanza (nextime / spora )'s avatar
      Add PyPI packaging support and build automation · 3cbe1fe0
      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.
      3cbe1fe0
  2. 05 Feb, 2026 6 commits