1. 08 Feb, 2026 16 commits
  2. 07 Feb, 2026 13 commits
  3. 06 Feb, 2026 11 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Fix Google GenAI streaming response handling · 77c08ee2
      Stefy Lanza (nextime / spora ) authored
      - Return Google's synchronous iterator directly from provider handler
      - Detect Google streaming responses by checking for __iter__ but not __aiter__
      - Convert Google chunks to OpenAI format in stream_generator
      - Handle both sync (Google) and async (OpenAI/Anthropic) streaming responses
      - Fix 'async_generator object is not iterable' error
      
      This fixes streaming requests through autoselect and rotation handlers
      that were failing with 'async_generator' object is not iterable error.
      77c08ee2
    • Stefy Lanza (nextime / spora )'s avatar
      Fix Google GenAI streaming handler to use async generator · 81e9a8f5
      Stefy Lanza (nextime / spora ) authored
      - Keep stream_generator as async function (not sync)
      - Wrap Google's synchronous iterator in async generator
      - Properly structure if/else for streaming vs non-streaming paths
      - Fix 'client has been closed' error in streaming responses
      
      This fixes the issue where streaming requests through autoselect
      were failing with 'Cannot send a request, as a client has been closed'
      error.
      81e9a8f5
    • Stefy Lanza (nextime / spora )'s avatar
      Fix streaming chunk structure for Google GenAI · 63268f97
      Stefy Lanza (nextime / spora ) authored
      - Ensure complete chunk object is yielded as single unit
      - Add logging to show complete chunk structure
      - Fix issue where chunk was being serialized as separate fields
      - Maintain OpenAI-compatible chat.completion.chunk format
      
      This should fix the streaming issue where chunks were being
      serialized as separate data: lines instead of complete
      JSON objects.
      63268f97
    • Stefy Lanza (nextime / spora )'s avatar
      Implement streaming support for Google GenAI provider · 8360e33b
      Stefy Lanza (nextime / spora ) authored
      - Use generate_content_stream() for streaming requests
      - Create async generator that yields OpenAI-compatible chunks
      - Extract text from each stream chunk
      - Generate unique chunk IDs
      - Format chunks as chat.completion.chunk objects
      - Include delta content in each chunk
      - Maintain non-streaming functionality for regular requests
      
      This fixes the streaming issue where Google GenAI was returning
      a dict instead of an iterable, causing 'JSONResponse object is
      not iterable' errors.
      8360e33b
    • Stefy Lanza (nextime / spora )'s avatar
      Create test script for AISBF proxy · 3c7bec4c
      Stefy Lanza (nextime / spora ) authored
      - Test non-streaming requests to autoselect endpoint
      - Test streaming requests to autoselect endpoint
      - Test listing available providers
      - Test listing models for autoselect endpoint
      - Use model 'autoselect' for autoselect endpoint
      - Include jq installation instructions for formatted output
      
      Run with: ./test_proxy.sh
      3c7bec4c
    • Stefy Lanza (nextime / spora )'s avatar
      Remove Pydantic validation to test serialization · 6a1fc753
      Stefy Lanza (nextime / spora ) authored
      - Remove ChatCompletionResponse validation from GoogleProviderHandler
      - Remove ChatCompletionResponse validation from AnthropicProviderHandler
      - Return raw response dict directly
      - Add logging to show response dict keys
      - This tests if Pydantic validation was causing serialization issues
      
      Testing if removing validation fixes client-side 'Cannot read properties
      of undefined' errors.
      6a1fc753
    • Stefy Lanza (nextime / spora )'s avatar
      Wrap Google and Anthropic provider responses in JSONResponse · 4760277f
      Stefy Lanza (nextime / spora ) authored
      GoogleProviderHandler:
      - Wrap validated response dict in JSONResponse before returning
      - Add logging to confirm JSONResponse is being returned
      - Ensures proper JSON serialization for Google GenAI responses
      
      AnthropicProviderHandler:
      - Wrap validated response dict in JSONResponse before returning
      - Add logging to confirm JSONResponse is being returned
      - Ensures proper JSON serialization for Anthropic responses
      
      RequestHandler:
      - Remove JSONResponse wrapping (now handled by providers)
      - Update logging to detect JSONResponse vs dict responses
      - OpenAI and Ollama providers return raw dicts (already compatible)
      
      This fixes client-side 'Cannot read properties of undefined' errors by ensuring
      Google and Anthropic responses are properly serialized as JSONResponse,
      while leaving OpenAI and Ollama responses as-is since they're already
      OpenAI-compatible.
      4760277f