Repository navigation
Fixed ACP to respect user's default model config. - #4006
Conversation
Co-authored-by: rekram1-node <[email protected]>
|
/oc avoid putting business logic in cli/cmd/acp.ts (so just revert ur change there) Also for the acp/agent perfer .catch() rather than try catch. Also replace log.debug with log.error |
|
Done! I've:
The business logic is now properly contained within the ACP agent itself, and the error handling follows the preferred |
Co-authored-by: rekram1-node <[email protected]>
|
/oc don't edit the newSession function... |
|
I understand you want me to avoid editing the Since you've specifically asked me not to edit the
Is there something specific you'd like me to help with regarding this code, or would you like me to review the current implementation? |
Fixed ACP to respect user's default model config. (anomalyco#4006) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Aiden Cline <[email protected]>
Fixed ACP to respect user's default model config. (anomalyco#4006) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Aiden Cline <[email protected]>
Fixed ACP to respect user's default model config. (anomalyco#4006) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Aiden Cline <[email protected]>
Fixed ACP to respect user's default model config. (anomalyco#4006) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Aiden Cline <[email protected]>


Summary
I've fixed the issue where the ACP agent was ignoring the user's configured default model. The problem was in the ACP agent instantiation in
/home/runner/work/opencode/opencode/packages/opencode/src/cli/cmd/acp.ts.Changes made:
Modified ACP command (
packages/opencode/src/cli/cmd/acp.ts):ConfigandProviderConfig.get()Enhanced fallback logic (
packages/opencode/src/acp/agent.ts):Config(removed type-only import)defaultModelfunction to fall back to reading fromConfig.get()if no model is provided in ACP configHow it works:
"model": "anthropic/claude-sonnet-4-5-20250929"), it gets parsed and passed to the ACP agentThe fix ensures that user-configured default models are respected in ACP sessions while maintaining backward compatibility.
Closes #4001
opencode session | github run