fix: pre-existing sweep — 15 fixes across router, realtime, recorder, fal-audio, gemini-interactions, and drift infra#230
Open
jpr5 wants to merge 7 commits into
Open
fix: pre-existing sweep — 15 fixes across router, realtime, recorder, fal-audio, gemini-interactions, and drift infra#230jpr5 wants to merge 7 commits into
jpr5 wants to merge 7 commits into
Conversation
commit: |
97fb02c to
cad6cae
Compare
Collapse dead if/else branch in array systemMessage matching (both paths were identical after the exact-match fix). Add elevenlabs-tts and translation to the bidirectional endpoint compatibility filter.
…parts, ws.send race Complete session.update rollback with full snapshot. Add missing Beta flat fields for noise reduction and transcription. Apply turn_detection updates from session.update. Concatenate all text content parts in realtimeItemsToMessages. Wrap ws.send in try-catch for TOCTOU safety.
…n guards Change ctString ?? to || for empty-string fallback. Derive EndpointType from FixtureMatch instead of duplicate union. Add negative guards to Gemini Interactions outputs detection. Scope turnIndex/hasToolResult to chat endpoints. Document gemini-interactions provider key remap.
…unks framing Add missing webSearches warning to tool-call-only branch. Align interactionsUsage with geminiUsageMetadata fallback chain. Only count content.delta events for truncateAfterChunks (skip framing events).
Replace headers: {} with flattenHeaders(req.headers) in 6 journal
entries. Add isJSONResponse branch to handleSyncRun. Document shared
endpoint type between queue-submit and sync-run.
Replace deterministic call_gemini_${name}_${i} IDs with random
generateToolCallId() to prevent cross-turn collisions. Wrap ws.send
in try-catch for connection-close race safety. Update tests for
random IDs.
…rdening Add input_tokens/promptTokenCount/candidatesTokenCount to resolveUsage. Preserve error cause in resolveResponse rethrow. Update aimock header. Escape regex in extractFormField, warn on boundary-less fallback. Fix parseTypedSSE multi-line handling, [DONE] filter, JSON error context, retry logging, and API key redaction in drift providers.
cad6cae to
f770b80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 15 pre-existing issues identified during CR of PRs #226 and #229. Grouped by area:
Router — systemMessage array exact-match logic bug (unsatisfiable for 2+ needles), missing elevenlabs-tts/translation in endpoint compatibility filter
WS-Realtime — incomplete session.update rollback (only restored model/type, now captures full snapshot), missing Beta flat fields for noise reduction and transcription
Recorder — Content-Type empty-string fallback (changed ?? to ||), derived EndpointType from FixtureMatch instead of duplicate union
Gemini Interactions — missing webSearches warning on tool-call-only branch, interactionsUsage now honors Gemini-native field names (promptTokenCount/candidatesTokenCount/totalTokenCount)
fal-audio + ElevenLabs — 6 journal entries now use flattenHeaders(req.headers) instead of {}, handleSyncRun accepts RawJSONResponse fixtures
Small fixes — buildEmbeddingResponse accepts optional usage, geminiTurnsToMessages warns on unrecognized roles, types.ts header LLMock→aimock, extractFormField escapes regex metacharacters, parseTypedSSE null guards
Test plan