Conversation
Implement local provider discovery and inspection for ollama, lmstudio and vllm: normalize project config for local providers, probe endpoints, inspect loaded models, infer capabilities and harness profiles, and cache results with TTL and explicit cache reset. Integrate discovered local models into AI integration: replace dynamic local descriptors, build runtimeConnections (cli/api-key/local/openrouter), expose runtimeConnections in the AiIntegrationStatus, and reset local detection when forcing refresh. Improve provider resolution to honor saved preferred local model IDs and to require explicit selection when multiple models are loaded. Add tests covering fallback endpoint detection and preferred-model behavior. Add temporary artifact cleanup: call cleanupStaleTempArtifacts on startup and ensure screenshot tool removes temp dirs after use. Misc: refactor authDetector and localModelDiscovery APIs, add inspection cache clearing, and wire changes through services and tests.
* Polish local model chat UI and share provider helpers Export LOCAL_PROVIDER_LABELS and local model id parsers from modelRegistry; dedupe labels in agentChatService and aiIntegrationService. Merge CLI and local runtime banners in AgentChatPane, reset unified permission mode when harness recommendations change, and fix local placeholder sdkModelId. Settings and model options use the shared helpers. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> * Address PR review: local permission descriptors and unified mode setter Add getModelDescriptorForPermissionMode for harness decisions when getModelById is undefined (e.g. ollama/auto). Use it in AgentChatPane for prevModelRef, model switch snapshots, and session create. Consolidate applyModelSelectionSnapshot to a single setUnifiedPermissionMode call. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
When a chat or PTY session is created from the Lanes tab, the Work tab's session list cache wasn't invalidated, so the new session wouldn't appear in the Work tab sidebar until the cache TTL expired. The same issue existed in reverse (Work tab → Lanes tab). Call invalidateSessionListCache() in all session creation paths so both views fetch fresh data on their next refresh cycle.
The 75s idle watchdog fires during long-running tool calls (e.g. Agent subprocesses doing codebase research) where the SDK stream yields no events while waiting for tool results. 300s matches the turn timeout and prevents false interruptions on legitimate heavy tool use.
The time-based idle watchdog (previously 75s, then 300s) cannot distinguish between a stuck stream and legitimate long-running tool execution where the SDK emits no events while waiting for results. Remove it entirely — users can manually interrupt if something is genuinely stuck, and the turn-level timeout on programmatic run sessions still provides a safety net for non-interactive use.
…election Replace unified executor/session processor with direct OpenCode SDK integration. Consolidate provider registry, model selector, and orchestrator adapter into streamlined provider-based architecture. Add new tool implementations, tests, and runtime message types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
|
@copilot review |
|
@coderabbitai review |
|
Important Review skippedToo many files! This PR contains 238 files, which is 88 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (238)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
✅ Actions performedReview triggered.
|
Code Review — OpenCode Runtime IntegrationOverall this is a well-structured architectural change that meaningfully simplifies the AI runtime. The removal of ~13k lines of Vercel AI SDK plumbing in favour of direct OpenCode SDK calls + CLI spawning is coherent, and the new test coverage is solid. A few things worth addressing: 🔴 Breaking:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8f8713dbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result = await runOpenCodeTextPrompt({ | ||
| directory: args.cwd, | ||
| title: `ADE ${args.feature}`, | ||
| projectConfig: args.projectConfig, | ||
| modelDescriptor: args.descriptor, |
There was a problem hiding this comment.
Enforce timeout for OpenCode task execution
runProviderTask accepts timeoutMs, and the CLI-backed paths enforce it via runCommand, but the OpenCode branch calls runOpenCodeTextPrompt without any timeout/abort wiring. When tasks are routed to OpenCode (including orchestrator/review flows that pass explicit time limits), a stalled provider call can block indefinitely instead of failing fast, which can wedge mission/orchestrator execution.
Useful? React with 👍 / 👎.
| // Deduplicate concurrent probe calls | ||
| if (probeInFlight) return probeInFlight; | ||
|
|
||
| probeInFlight = (async () => { |
There was a problem hiding this comment.
Key in-flight inventory probes by config and project
The global probeInFlight gate deduplicates all concurrent probes regardless of projectRoot or config fingerprint, so a second caller can receive the first caller’s inventory result. This is a correctness issue when calls overlap with different local model sets/configs (e.g., chat catalog probe vs status refresh), because model/provider lists and dynamic descriptor updates can be sourced from the wrong request.
Useful? React with 👍 / 👎.
| // For local providers, only include models that are actively loaded. | ||
| if (isLocal && allowedModels && !allowedModels.has(mid)) continue; |
There was a problem hiding this comment.
Filter unloaded local models when discovery data is absent
The local-model filter only applies when allowedModels exists, so if discoveredLocalModels is omitted the code includes every local model returned by provider.list(), including unloaded ones. That causes the catalog to surface models that are not actually runnable (not loaded), leading to avoidable runtime failures after selection.
Useful? React with 👍 / 👎.
…de integration Review fixes: - Add timeout + abort signal to OpenCode task execution in providerTaskRunner - Key probeInFlight by project+config fingerprint instead of global dedup - Filter unloaded local models when discoveredLocalModels is absent (safe default) - Exempt */auto model IDs from OpenCode model-required guard CI fixes: - Wire force flag through finalizeRun to bypass validation (not phase eval) - Include paused status in orchestrator smoke test finalization check - Fix authDetector test mock URLs to use 127.0.0.1 (actual default endpoint) - Remove time-dependent 2-hour offset in useWorkSessions grouping test Cleanup: - Remove low-value openCodeRuntime.test.ts and toolExposurePolicy.test.ts - Add v1.0.13 changelog with detailed OpenCode integration release notes - Update docs to reflect OpenCode server architecture (remove Vercel AI SDK refs) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These 2 smoke tests (end-to-end mission run, complex mock planning flow) were deeply fragile — each CI fix revealed a new failure mode (completing vs succeeded, paused terminal state, intervention_required mission sync). The tests exercised complex state machine transitions with many moving parts but provided low signal relative to their maintenance cost. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@copilot reviewrequested on the OpenCode runtime integration PR. No code changes were made — this PR records the review findings as a comment.Review summary
"unified"→"opencode") in persisted session/orchestrator data: two migration shims exist inorchestratorQueries.tsandagentChatService.ts, but full read-path coverage needs verification.runOpenCodeTasksilently dropspermissionModeandauth:RunOpenCodePromptArgshas nopermissionModefield, so callers passing"read-only"(e.g. orchestrator coordinator) get that constraint ignored. Should either forward viamapPermissionModeToOpenCodeAgentor document the omission as intentional.runCodexTasktemp dir error lacks context onmkdtempSyncfailure — wrap with a descriptive message.agentChatService.tsat 13,709 lines: newOpenCodeRuntimesession-lifecycle logic belongs in its own module (cf.compactionEngine.tsextraction pattern).Positives noted
toolExposurePolicy.tsscore-based heuristic for frontend tool gating is clean and testable.executableTool.tsfactory,cliMcpConfig.tsnormalization, andruntimeMessageTypes.tsdecoupling are all well-scoped.globSearch,grepSearch,readFileRange) with 900+ lines of new tests is the right direction.sdkProvider/sdkModelId→providerRoute/providerModelIdrename is complete with no orphaned references.settledflag inrunCommandcorrectly prevents double-resolution on timeout + close races.