Implement planner-only search degradation and user signals#201
Implement planner-only search degradation and user signals#201
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR adds profile-selection provenance (original vs effective profile IDs), conditionally reroutes planner-selected non-search-capable profiles to enabled search-capable fallbacks, emits structured warnings and telemetry about reroutes, and surfaces search-unavailability warnings to clients (Discord/web). Tests and schemas updated accordingly. Changes
Sequence DiagramsequenceDiagram
participant Request
participant Orchestrator as Chat Orchestrator
participant ProfileMgr as Profile Manager / Catalog
participant Fallback as Fallback Selector
participant Executor as Execution/Telemetry
participant Client
Request->>Orchestrator: Receive chat request (may include profile)
Orchestrator->>Orchestrator: Determine profileSelectionSource (request/planner/default)
Orchestrator->>ProfileMgr: Fetch selected profile capabilities (canUseSearch?)
alt Planner-selected profile lacks search
ProfileMgr-->>Orchestrator: cannot use search
Orchestrator->>Fallback: Find enabled search-capable fallback (different id)
Fallback-->>Orchestrator: fallback profile found
Orchestrator->>Orchestrator: Set originalProfileId, effectiveProfileId, rerouteApplied=true
Orchestrator->>Executor: Emit reroute warning + execution context
else Non-planner (request) selected lacks search
ProfileMgr-->>Orchestrator: cannot use search
Orchestrator->>Orchestrator: Clear generationForExecution.search, set toolExecutionContext:web_search skipped
Orchestrator->>Executor: Emit skipped search warning with provenance
end
Orchestrator->>Executor: Persist planner/generation executionContext (include original/effective IDs)
Executor-->>Client: Response + metadata (execution timeline)
Client->>Client: Detect skipped-search signal in metadata
Client-->>Client: Render warning (Discord / web footer)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ased on profile selection source. Update tests to reflect changes in profile capabilities and ensure accurate fallback profile selection. Enhance accessibility in ProvenanceFooter by adding ARIA attributes to the warning message.
Implements planner-only reroute/drop behavior in backend orchestration, emits
originalProfileId/effectiveProfileIdexecution metadata, aligns structured logs, and adds user-visible “search unavailable for selected model” messaging in web and Discord.Summary by CodeRabbit