Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(llm): route OpenCode Haiku 5.5 to Messages (#1470)

AkitaOnRails11ab1003d9ef
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41e4a073..e3539787 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,9 @@ version in [`docs/changelog/`](docs/changelog/):
## [Unreleased]
### Fixed
+- Routed OpenCode's `claude-haiku-5-5` through the Anthropic Messages API for
+ both Go and Zen instead of the unsupported Chat Completions protocol.
+ ([#1470](https://github.com/akitaonrails/ai-memory/issues/1470))
- Ignored a UTF-8 byte-order mark at the start of `run --env-file` input so
the first environment variable keeps its intended name.
([#1465](https://github.com/akitaonrails/ai-memory/pull/1465))
diff --git a/crates/ai-memory-llm/src/opencode.rs b/crates/ai-memory-llm/src/opencode.rs
index 413f73be..a011a355 100644
--- a/crates/ai-memory-llm/src/opencode.rs
+++ b/crates/ai-memory-llm/src/opencode.rs
@@ -318,6 +318,7 @@ const ANTHROPIC_MESSAGES_MODELS: &[&str] = &[
"claude-sonnet-4-6",
"claude-sonnet-4-5",
"claude-sonnet-4",
+ "claude-haiku-5-5",
"claude-haiku-4-5",
"qwen3.8-flash",
"qwen3.7-max",
@@ -672,6 +673,11 @@ mod tests {
OpenCodeApi::Responses,
),
("gpt-6-luna", OpenCodeApi::Responses, OpenCodeApi::Responses),
+ (
+ "claude-haiku-5-5",
+ OpenCodeApi::AnthropicMessages,
+ OpenCodeApi::AnthropicMessages,
+ ),
(
"qwen3.8-flash",
OpenCodeApi::AnthropicMessages,
@@ -741,6 +747,7 @@ mod tests {
"muse-spark-1.2-contributor",
"gpt-6-luna",
"gpt-5.6-luna",
+ "claude-haiku-5-5",
"qwen3.8-flash",
"deepseek-v4-flash",
] {
@@ -749,7 +756,7 @@ mod tests {
let base = format!("{}/{catalogue}/v1", server.uri());
let api = match (model, catalogue) {
("minimax-m3" | "minimax-m2.7" | "qwen3.8-max", "zen/go")
- | ("qwen3.8-flash", _) => OpenCodeApi::AnthropicMessages,
+ | ("qwen3.8-flash" | "claude-haiku-5-5", _) => OpenCodeApi::AnthropicMessages,
("muse-spark-1.3-contributor" | "muse-spark-1.2-contributor", "zen/go")
| ("gpt-6-luna" | "gpt-5.6-luna", _) => OpenCodeApi::Responses,
_ => OpenCodeApi::ChatCompletions,