From 58732e22ed204f0a4849e67521034f733636a19c Mon Sep 17 00:00:00 2001
From: William Pembleton <35147738+Iotaslair@users.noreply.github.com>
Date: Wed, 28 Oct 2026 04:10:04 +0000
Subject: [PATCH] Add Lemonade as a provider (#12920)
---
crates/goose-providers/src/declarative.rs | 1 +
.../src/declarative/definitions/lemonade.json | 34 +++++++++++++
crates/goose/src/providers/init.rs | 21 ++++++++
.../docs/getting-started/providers.md | 50 +++++++++++++++++++
goose-self-test.yaml | 4 ++
5 files changed, 110 insertions(+)
create mode 100644 crates/goose-providers/src/declarative/definitions/lemonade.json
diff --git a/crates/goose-providers/src/declarative.rs b/crates/goose-providers/src/declarative.rs
index ddd604d36..882075fdc 100644
--- a/crates/goose-providers/src/declarative.rs
+++ b/crates/goose-providers/src/declarative.rs
@@ -30,6 +30,7 @@ pub(crate) mod declarative_providers {
iflytek_astron,
inception,
ionet,
+ lemonade,
llama_swap,
lmstudio,
lynkr,
diff --git a/crates/goose-providers/src/declarative/definitions/lemonade.json b/crates/goose-providers/src/declarative/definitions/lemonade.json
new file mode 100644
index 000000000..001887954
--- /dev/null
+++ b/crates/goose-providers/src/declarative/definitions/lemonade.json
@@ -0,0 +1,34 @@
+{
+ "name": "lemonade",
+ "engine": "openai",
+ "display_name": "Lemonade",
+ "description": "Run local models with the Lemonade server",
+ "api_key_env": "LEMONADE_API_KEY",
+ "base_url": "${LEMONADE_HOST}/v1/chat/completions",
+ "env_vars": [
+ {
+ "name": "LEMONADE_HOST",
+ "required": false,
+ "secret": false,
+ "primary": true,
+ "default": "http://localhost:13305",
+ "description": "Base URL of the Lemonade server (default: http://localhost:13305)"
+ }
+ ],
+ "dynamic_models": true,
+ "models": [],
+ "supports_streaming": true,
+ "requires_auth": false,
+ "skip_canonical_filtering": true,
+ "setup": {
+ "category": "model",
+ "setup_method": "config_fields",
+ "group": "additional",
+ "docs_url": "https://lemonade-server.ai/docs/api/openai/",
+ "field_overrides": [{
+ "key": "LEMONADE_HOST",
+ "label": "Host URL",
+ "placeholder": "http://localhost:13305"
+ }]
+ }
+}
diff --git a/crates/goose/src/providers/init.rs b/crates/goose/src/providers/init.rs
index 08bf5ac9c..70ab438df 100644
--- a/crates/goose/src/providers/init.rs
+++ b/crates/goose/src/providers/init.rs
@@ -353,6 +353,27 @@ mod tests {
.any(|key| key.name == "GONDOLA_API_KEY" && key.secret));
}
+ #[tokio::test]
+ async fn test_lemonade_provider_registry_wiring() {
+ let lemonade = get_from_registry("lemonade")
+ .await
+ .expect("lemonade provider should be registered");
+ let meta = lemonade.metadata();
+
+ assert_eq!(meta.name, "lemonade");
+ assert_eq!(meta.display_name, "Lemonade");
+ assert!(meta.default_model.is_empty());
+ assert!(meta
+ .config_keys
+ .iter()
+ .any(|key| key.name == "LEMONADE_API_KEY" && key.secret));
+ assert!(meta.config_keys.iter().any(|key| {
+ key.name == "LEMONADE_HOST"
+ && !key.required
+ && key.default.as_deref() == Some("http://localhost:13305")
+ }));
+ }
+
#[tokio::test]
async fn test_openai_compatible_providers_config_keys() {
let providers_list = providers().await;
diff --git a/documentation/docs/getting-started/providers.md b/documentation/docs/getting-started/providers.md
index 175a70b9f..0cc64a695 100644
--- a/documentation/docs/getting-started/providers.md
+++ b/documentation/docs/getting-started/providers.md
@@ -44,6 +44,7 @@ goose is compatible with a wide range of LLM providers, allowing you to choose a
| [iFlytek Spark](https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html) | iFlytek Spark (讯飞星火) models (4.0Ultra, generalv3.5, max-32k) via the OpenAI-compatible HTTP API. Best for chat: Spark needs `tool_calls_switch=true` (not injectable here) to return OpenAI-style tool calls. | `SPARK_API_PASSWORD` |
| [iFlytek Astron MaaS](https://maas.xfyun.cn/) | iFlytek Astron MaaS (讯飞星辰) hosting Spark X2, DeepSeek, GLM, Kimi, MiniMax, Qwen, and Astron coding models via an OpenAI-compatible API. Set `ASTRON_BASE_URL` to switch between the Token Plan and Coding Plan endpoints. | `ASTRON_API_KEY`, `ASTRON_BASE_URL` (optional) |
| [IO Intelligence](https://io.net/) | Inference for open-weight models (DeepSeek, Qwen, Llama, GLM, Kimi, gpt-oss and more) through io.net's OpenAI-compatible API. | `IONET_API_KEY` |
+| [Lemonade](https://lemonade-server.ai/) | Run local models with the Lemonade server's OpenAI-compatible API. **Because this provider runs locally, you must first [download a model](#local-llms).** | None required. Connects to local server at `localhost:13305` by default. |
| [LiteLLM](https://docs.litellm.ai/docs/) | LiteLLM proxy supporting multiple models with automatic prompt caching and unified API access. | `LITELLM_HOST`, `LITELLM_BASE_PATH` (optional), `LITELLM_API_KEY` (optional), `LITELLM_CUSTOM_HEADERS` (optional), `LITELLM_TIMEOUT` (optional) |
| [LM Studio](https://lmstudio.ai/) | Run local models with LM Studio's OpenAI-compatible server. **Because this provider runs locally, you must first [download a model](#local-llms).** | None required. Connects to local server at `localhost:1234` by default. |
| [Meta](https://dev.meta.ai/) | Meta's Model API, home of the Muse Spark models. | `META_MODEL_API_KEY` |
@@ -1407,6 +1408,55 @@ Here are some local providers we support:
Make sure the model name you enter in goose matches the model identifier shown in LM Studio's server panel.
:::
+
+ [Lemonade](https://lemonade-server.ai/) lets you run open-source models locally with an OpenAI-compatible API server.
+
+ 1. [Download and install Lemonade](https://lemonade-server.ai/).
+ 2. Download a model that supports tool calling (e.g., Qwen, Llama, or Mistral variants).
+ 3. Start the Lemonade server. The server runs on `http://localhost:13305` by default.
+
+ 4. Configure goose to use Lemonade:
+
+
+
+ 1. Click the button in the top-left to open the sidebar.
+ 2. Click the `Settings` button on the sidebar.
+ 3. Click the `Models` tab.
+ 4. Click `Configure providers`.
+ 5. Choose `Lemonade` from the provider list and click `Configure`.
+ 6. Click `Submit` (no API key is needed).
+ 7. Select the model you have loaded in Lemonade.
+
+
+ 1. Run:
+ ```sh
+ goose configure
+ ```
+ 2. Select `Configure Providers` from the menu.
+ 3. Choose `Lemonade` as the provider.
+ 4. Enter the model name that matches the model loaded in Lemonade.
+
+ ```
+ ┌ goose-configure
+ │
+ ◇ What would you like to configure?
+ │ Configure Providers
+ │
+ ◇ Which model provider should we use?
+ │ Lemonade
+ │
+ ◇ Enter a model from that provider:
+ │ qwen2.5-7b-instruct
+ │
+ └ Configuration saved successfully
+ ```
+
+
+
+ :::tip Model Name
+ Make sure the model name you enter in goose matches the model identifier shown in Lemonade's server panel.
+ :::
+
[Atomic Chat](https://github.com/AtomicBot-ai/Atomic-Chat) lets you run open-source models locally with an OpenAI-compatible API server.
diff --git a/goose-self-test.yaml b/goose-self-test.yaml
index bc7204db2..7973668b4 100644
--- a/goose-self-test.yaml
+++ b/goose-self-test.yaml
@@ -193,6 +193,10 @@ prompt: |
### Gondola Provider Validation
When running from a goose source checkout:
1. Run `cargo test -p goose test_gondola_provider_registry_wiring` to verify Gondola is registered with the correct name, default model (`deepseek-v4-flash`), and a secret `GONDOLA_API_KEY` config key.
+
+ ### Lemonade Provider Validation
+ When running from a goose source checkout:
+ 1. Run `cargo test -p goose --features scheduler --lib test_lemonade_provider_registry_wiring` to verify Lemonade is registered with the correct name and display name, an empty default model (it serves dynamic models), an optional secret `LEMONADE_API_KEY` config key, and a `LEMONADE_HOST` key defaulting to `http://localhost:13305`.
If the source checkout or Rust toolchain is unavailable, mark this validation as skipped rather than failed.
### Databricks AI Gateway Path Validation