Skip to content

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

Rust

refactor(llm)!: remove the deprecated OPENCODE_ZEN_BASE_URL constant

AkitaOnRailsd3b280fd74fb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eda2abc3..834bfd33 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -461,6 +461,9 @@ and [0.x](docs/changelog/0.x.md).
`api_credentials`, so user records from `/admin/users` and `ai-memory user
list --json` no longer carry `token_expired_at`, and `user list` no longer
shows an `expired` status.
+- Removed the `OPENCODE_ZEN_BASE_URL` constant from the `ai-memory-llm`
+ crate, deprecated since 2.1.0; use `OPENCODE_GO_BASE_URL`, which holds the
+ same URL. The `opencode-zen` provider alias is unchanged.
### Fixed
- Fixed the companion relay refusing to open its queue on Windows when another
diff --git a/crates/ai-memory-llm/src/lib.rs b/crates/ai-memory-llm/src/lib.rs
index 204a227d..7d1c3b54 100644
--- a/crates/ai-memory-llm/src/lib.rs
+++ b/crates/ai-memory-llm/src/lib.rs
@@ -141,8 +141,6 @@ pub use openai_oauth::{
OPENAI_OAUTH_TOKEN_URL, OpenAiExtras, OpenAiOAuthProvider, OpenAiOAuthToken,
OpenAiOAuthTokenResponse,
};
-#[allow(deprecated)]
-pub use opencode::OPENCODE_ZEN_BASE_URL;
pub use opencode::{
OPENCODE_DEFAULT_MODEL, OPENCODE_GO_BASE_URL, OPENCODE_SESSION_HEADER, OpenCodeProvider,
};
diff --git a/crates/ai-memory-llm/src/opencode.rs b/crates/ai-memory-llm/src/opencode.rs
index cfc77ca1..7d462fbf 100644
--- a/crates/ai-memory-llm/src/opencode.rs
+++ b/crates/ai-memory-llm/src/opencode.rs
@@ -30,13 +30,6 @@ use crate::types::{
/// Primary OpenCode Go OpenAI-compatible base URL.
pub const OPENCODE_GO_BASE_URL: &str = "https://opencode.ai/zen/go/v1";
-/// Public OpenCode Zen/Go OpenAI-compatible base URL.
-#[deprecated(
- since = "2.1.0",
- note = "names Zen but holds Go's endpoint; use OPENCODE_GO_BASE_URL"
-)]
-pub const OPENCODE_ZEN_BASE_URL: &str = OPENCODE_GO_BASE_URL;
-
/// Default model when `AI_MEMORY_LLM_MODEL` is not set.
pub const OPENCODE_DEFAULT_MODEL: &str = "mimo-v2.6-flash";
@@ -620,12 +613,6 @@ mod tests {
assert!(!OPENCODE_DEFAULT_MODEL.is_empty());
}
- #[test]
- #[allow(deprecated)]
- fn the_deprecated_alias_still_resolves_to_go() {
- assert_eq!(OPENCODE_ZEN_BASE_URL, OPENCODE_GO_BASE_URL);
- }
-
#[test]
fn with_base_url_repoints_the_provider_at_zen() {
let provider = OpenCodeProvider::new(SecretString::from("sk-test"), "model-x").unwrap();