Conversation
Greptile SummaryThis PR adds four new boolean routing conditions (
Confidence Score: 5/5Safe to merge — the new content-feature detection and routing logic is well-contained, correctly validated on both frontend and backend, and covered by targeted tests. The change is additive: new condition fields go through the same validation pipeline as the existing boolean stream field (now unified in validateBoolEqualityLeaf), the orchestrator only pays the scanning cost when conditional candidates exist, and the hasAll() early-exit prevents redundant iteration. No existing behaviour is altered beyond signature changes to matchesAssociationWhen that are fully reflected in updated tests. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Incoming LLM Request] --> B{hasConditionalCandidates?}
B -- No --> C[Return all candidates]
B -- Yes --> D[Compute promptTokens, stream, requestFormat]
D --> E[detectRequestContentFeatures]
E --> F{Scan MultipleContent parts}
F -- ImageURL != nil --> G[hasImage = true]
F -- VideoURL != nil --> H[hasVideo = true]
F -- Document != nil --> I[hasDocument = true]
F -- InputAudio != nil --> J[hasAudio = true]
G & H & I & J --> K{hasAll?}
K -- Yes --> L[Early return features]
K -- No --> F
L --> M[matchesAssociationWhen]
F -- Exhausted --> M
M --> N{Evaluate Condition}
N -- has_image / has_video / has_document / has_audio --> O[Compare bool feature flag]
N -- prompt_tokens --> P[Numeric comparison]
N -- stream --> Q[Bool comparison]
N -- request_format --> R[String equality]
N -- daily_time --> S[Time range check]
O & P & Q & R & S --> T{Match?}
T -- Yes --> U[Include candidate]
T -- No --> V[Exclude candidate]
Reviews (2): Last reviewed commit: "feat: route with media condition, close ..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.