Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _docs/config/opencode-compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Blank cells mean that runtime behavior is not supported by that project today. `
| `agent.<name>.model` / `temperature` / `top_p` | ✅ | partial | Subagent `model` overrides are applied for Task/`@agent`; sampling settings are parsed but not yet applied. |
| Markdown agent files | ✅ | ✅ | `.opencode/agents/*.md` frontmatter is parsed; body content becomes agent instructions. |
| `provider.<id>.options.timeout` | ✅ | partial | Integer milliseconds or `false` to disable timeout. |
| `provider.<id>` using `@ai-sdk/openai-compatible` | ✅ | ✅ | When `options.baseURL` is configured, crabcode requests its OpenAI-compatible `/v1/models` endpoint for `/models`. Manually configured model metadata takes precedence; unsupported endpoints leave manual models unchanged. |
| `theme` | ✅ | ✅ | In crabcode config files only. OpenCode config `theme` is ignored by crabcode. |
| `notifications` | | ✅ | crabcode-specific sounds, desktop notifications, and terminal alert signals such as Zed tab dots. |
| `images` | | ✅ | crabcode-specific image placeholder opener. |
Expand Down
6 changes: 5 additions & 1 deletion src/command/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ pub fn handle_sessions<'a>(
} else {
session.title.clone()
};

crate::command::registry::DialogItem {
id: session.id.clone(),
name,
Expand Down Expand Up @@ -399,6 +398,10 @@ pub async fn load_models(parsed: ParsedCommand) -> CommandResult {
};

if let Ok(discovery) = discovery.as_ref() {
crate::model::discovery::merge_dialog_models(
&mut models,
discovery.discover_custom_models_for_dialog().await,
);
discovery.apply_custom_models_to_dialog(&mut models);
}

Expand Down Expand Up @@ -875,6 +878,7 @@ pub async fn refresh_models() -> CommandResult {
return CommandResult::Success(String::new());
}
};
discovery.clear_custom_model_discovery_cache();

let (providers_result, runtime_result) = tokio::join!(
discovery.refresh_cache(),
Expand Down
4 changes: 4 additions & 0 deletions src/model/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ pub async fn selectable_models(
} else {
Vec::new()
};
merge_dialog_models(
&mut models,
discovery.discover_custom_models_for_dialog().await,
);
discovery.apply_custom_models_to_dialog(&mut models);

let mut runtime_errors = Vec::new();
Expand Down
Loading
Loading