HonestAI / src /llm_router.py

Commit History

  1. Replace Novita AI with ZeroGPU Chat API (RunPod)⁠

    0747201

  1. Fix indentation issues in prepare_context_for_llm and _truncate_to_tokens methods

    bd329bc
  2. FINAL FIX: Correct except clause indentation - ensure proper alignment with try statement

    f608c70
  3. Fix return statement and else clause indentation in response handling

    043d8e9
  4. Fix else clause indentation at line 153 - align with if stream

    21a18e3
  5. Fix else clause indentation in response handling

    a67b5f4
  6. Fix raise statement indentation in exception handler

    44b41ba
  7. CRITICAL FIX: Correct except clause indentation at line 58 - align with try statement

    dc8667d
  8. Add logging for context window configuration and improve max_tokens calculation debugging

    ca77f38
  9. Fix IndentationError at line 378: correct indentation in _truncate_to_tokens method

    9d31b94
  10. CRITICAL FIX: Correct except clause indentation at line 57 - align with try statement

    6c81140
  11. Fix raise statement indentation

    b21bcac
  12. Fix IndentationError: correct else clause alignment - ensure else aligns with if stream

    5599138
  13. Fix IndentationError: correct else clause alignment at line 152

    074e6cc
  14. Fix critical syntax error: correct except clause indentation at line 57

    82b52b6
  15. Clean up try-except block formatting

    e96d039
  16. Fix encoding issue: replace special character in logger message

    e4c5683
  17. Fix except clause indentation in llm_router.py

    d14bd01
  18. Fix syntax errors in llm_router.py - Fix indentation issues in try/except blocks - Fix else clause alignment

    bb2bbad
  19. Fix max_tokens calculation to respect model context window (5000 tokens) - Add dynamic max_tokens calculation based on input size - Add novita_model_context_window configuration - Prevents 400 errors when input tokens exceed available output space

    a9135e0
  20. Fix max_tokens calculation to respect model context window

    42ed1a7
  21. Integrate Novita AI as exclusive inference provider - Add Novita AI API integration with DeepSeek-R1-Distill-Qwen-7B model - Remove all local model dependencies - Optimize token allocation for user inputs and context - Add Anaconda environment setup files - Add comprehensive test scripts and documentation

    927854c

  1. Fix: DynamicCache compatibility, dependencies, and Docker configuration⁠

    ea87e33
  2. Fix: BitsAndBytes compatibility and error handling⁠

    13fa6c4
  3. Phase 1: Remove HF API inference - Local models only⁠

    5787d0a
  4. Fix infinite fallback loop in local model loading⁠

    8d4bf4a
  5. Update model IDs to use Cerebras deployment and add gated repository error handling⁠

    b3aba24
  6. Security Enhancements: Production WSGI, Rate Limiting, Security Headers, Secure Logging⁠

    79ea999

  1. Initial commit: Research AI Assistant API

    8f4d405