1. 08 Feb, 2026 33 commits
  2. 07 Feb, 2026 7 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Update wrapper script · d9772366
      Stefy Lanza (nextime / spora ) authored
      d9772366
    • Stefy Lanza (nextime / spora )'s avatar
      Fix effective_context variable scope and calculate total tokens for streaming responses · 8f07c660
      Stefy Lanza (nextime / spora ) authored
      - Pass effective_context as parameter to stream_generator functions
      - Update _create_streaming_response signature to accept effective_context
      - Update all calls to _create_streaming_response to pass effective_context
      - Track accumulated response text for token counting in streaming
      - Calculate completion tokens for Google responses (since Google doesn't provide them)
      - Calculate completion tokens for non-Google providers when they don't provide token counts
      - Include prompt_tokens, completion_tokens, total_tokens, and effective_context in final chunk
      - Fixes 'name effective_context is not defined' error in streaming responses
      - Fixes issue where streaming responses had null token counts
      8f07c660
    • Stefy Lanza (nextime / spora )'s avatar
      Enable WAL mode for concurrent database access · d9cdab8b
      Stefy Lanza (nextime / spora ) authored
      - Enable PRAGMA journal_mode=WAL for better concurrent access
      - Set PRAGMA busy_timeout=5000 (5 seconds) for concurrent access
      - WAL mode allows multiple readers and one writer simultaneously
      d9cdab8b
    • Stefy Lanza (nextime / spora )'s avatar
      Initialize database at application startup · 7628a6be
      Stefy Lanza (nextime / spora ) authored
      - Import initialize_database from aisbf.database
      - Call initialize_database() in main() to create/recreate database
      - Clean up old token usage records to prevent database bloat
      7628a6be
    • Stefy Lanza (nextime / spora )'s avatar
      Add SQLite database module for persistent tracking · 2733f49f
      Stefy Lanza (nextime / spora ) authored
      - Create aisbf/database.py with DatabaseManager class
      - Track context dimensions (context_size, condense_context, condense_method, effective_context)
      - Track token usage for rate limiting (TPM, TPH, TPD)
      - Auto-create database at ~/.aisbf/aisbf.db if it doesn't exist
      - Clean up old token usage records to prevent database bloat
      - Export database module in __init__.py
      - Update setup.py to include database.py in package data
      2733f49f
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Add context management feature with automatic condensation · 55a8311f
      Stefy Lanza (nextime / spora ) authored
      - Add context_size, condense_context, and condense_method fields to Model class
      - Create new context.py module with ContextManager and condensation methods
      - Implement hierarchical, conversational, semantic, and algoritmic condensation
      - Calculate and report effective_context for all requests
      - Update handlers.py to apply context condensation when configured
      - Update providers.json and rotations.json with example context configurations
      - Update README.md and DOCUMENTATION.md with context management documentation
      - Export context module and utilities in __init__.py
      55a8311f