• Stefy Lanza (nextime / spora )'s avatar
    Fix Google GenAI response translation to OpenAI format · 9c5d68d9
    Stefy Lanza (nextime / spora ) authored
    - Properly extract finish_reason from candidate object and map to OpenAI format
    - Correctly extract usage metadata from response.usage_metadata structure
    - Extract prompt_token_count, candidates_token_count, and total_token_count
    - Add logging for usage metadata extraction
    - Handle Google finish reasons: STOP, MAX_TOKENS, SAFETY, RECITATION, OTHER
    
    This fixes the issue where Gemini responses were arriving corrupted to
    OpenAI-compatible clients due to incorrect parsing of the new Google GenAI
    SDK response structure.
    9c5d68d9
Name
Last commit
Last update
aisbf Loading commit data...
config Loading commit data...
.gitignore Loading commit data...
.providers.json.swp Loading commit data...
AI.PROMPT Loading commit data...
CHANGELOG.md Loading commit data...
DEBUG_GUIDE.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
PYPI.md Loading commit data...
README.md Loading commit data...
aisbf.sh Loading commit data...
build.sh Loading commit data...
clean.sh Loading commit data...
cli.py Loading commit data...
main.py Loading commit data...
pyproject.toml Loading commit data...
requirements.txt Loading commit data...
setup.py Loading commit data...
start_proxy.sh Loading commit data...