Add Lemonade as a provider (#12920)

This commit is contained in:
William Pembleton
2026-10-28 04:10:04 +00:00
committed by GitHub
parent 8a16788137
commit 58732e22ed
5 changed files with 110 additions and 0 deletions
@@ -30,6 +30,7 @@ pub(crate) mod declarative_providers {
iflytek_astron,
inception,
ionet,
lemonade,
llama_swap,
lmstudio,
lynkr,
@@ -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"
}]
}
}
+21
View File
@@ -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;
@@ -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.
:::
</TabItem>
<TabItem value="lemonade" label="Lemonade">
[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:
<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>
1. Click the <PanelLeft className="inline" size={16} /> 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.
</TabItem>
<TabItem value="cli" label="goose CLI">
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
```
</TabItem>
</Tabs>
:::tip Model Name
Make sure the model name you enter in goose matches the model identifier shown in Lemonade's server panel.
:::
</TabItem>
<TabItem value="atomic-chat" label="Atomic Chat">
[Atomic Chat](https://github.com/AtomicBot-ai/Atomic-Chat) lets you run open-source models locally with an OpenAI-compatible API server.
+4
View File
@@ -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