Route fixes:
- Add POST /v1/messages/chat/completions alias so OpenCode clients
misconfigured with baseURL ending in /v1/messages no longer get 404
Session affinity:
- Extract x-session-affinity HTTP header (sent by OpenCode) and use it
as the session key for token stickiness, falling back to body-level
session_id fields if the header is absent
Tool calling (streaming):
- finish_reason is now 'tool_calls' when function calls were emitted in
the stream (Gemini always sends STOP, so we check toolCallIndex > 0)
- createSyntheticOpenAIStream (stream fallback path) now emits all
tool_call deltas before the finish chunk instead of silently dropping
them when content is null
Tool calling (non-streaming):
- content is now always null when tool_calls are present, satisfying
strict clients that reject non-null content alongside tool_calls
- system_fingerprint field added to OpenAIChatResponse interface and
response builder for OpenAI spec compliance
Usage accounting:
- thoughtsTokenCount is now included in completion_tokens and
total_tokens for the streaming usage chunk, fixing undercount for
thinking/reasoning model runs