Skip to content

v1.0.2 - Compatibility Release

Choose a tag to compare

@jwadow jwadow released this 13 Dec 20:26
· 189 commits to main since this release

🐛 Bug Fixes

Fixed: 400 'Improperly formed request' error (and others) when using OpenCode and similar AI coding assistants (#2)

  • Added required index field to streaming tool_calls chunks (strict OpenAI API spec compliance)
  • Improved deduplication logic for tool_calls (prefers longer arguments over empty {})
  • Fixed handling of tool role messages in conversations

⚡ Improvements

Added: First Token Timeout Retry mechanism

  • Automatically retries streaming requests if the model doesn't respond within timeout
  • Prevents "stuck" requests when model takes too long to start responding
  • Returns 504 Gateway Timeout after exhausting retry attempts

⚙️ Configuration

New environment variables:

Variable Description Default
FIRST_TOKEN_TIMEOUT Timeout for waiting first token from model (seconds) 30
FIRST_TOKEN_MAX_RETRIES Max retry attempts on first token timeout 3
LOG_LEVEL Log level: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL INFO

📚 Documentation

  • Added English translation of ARCHITECTURE.md

Note: If you were experiencing 400 'Improperly formed request' errors (and others) with OpenCode or other AI coding assistants when using tool/function calling, this update should resolve those issues.

Full Changelog: v1.0.1...v1.0.2