Spaces:
Sleeping
Sleeping
Commit History
-
fix: code review issues (P1-P3)
- Cookie file caching with mtime check (no disk read per request) - Streaming retry logic (same as non-streaming) - Reusable httpx.Client and ssl context (no per-request allocation) - Shared _extract_texts_from_line() eliminates parsing duplication - _start_sse() helper eliminates 4x SSE header repetition - _usage() helper for token estimation - _parse_body() with proper 400 on invalid JSON - ValueError guard on @think= parameter - Single-pass regex in parse_tool_calls - Fixed __main__.py httpx detection (was always showing 'fallback') - Removed unused base64 import from gemini.pyd27caee -
feat: modularize + true streaming + multimodal support
- Split into package: gemini_web2api/{config,models,gemini,tools,server} - True SSE streaming via httpx (falls back to urllib if not installed) - Multimodal: image_url support in messages (base64 or URL) - pyproject.toml + requirements.txt for pip install - Entry: python -m gemini_web2api or gemini-web2api CLI85919ae