From 6e66c7e2586f49563164c8c10661a9166bae2aa6 Mon Sep 17 00:00:00 2001 From: elpidioassinaturas Date: Sun, 29 Nov 2026 18:23:36 -0300 Subject: [PATCH 1/3] feat(assistant): Ollama Cloud preset (#3380) A provider for ollama.com's OpenAI-compatible API: key from OLLAMA_API_KEY, a Get a key link, its own keychain account and a privacy description. Listed after the other keyed presets, so its key never takes another provider's place. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- apps/rustgis-cli/src/main.rs | 2 +- crates/assistant/src/provider.rs | 14 +++++++++ crates/assistant/src/tests.rs | 54 ++++++++++++++++++++++++++++++++ docs/cli.md | 2 +- docs/user-guide/assistant.md | 12 ++++--- 6 files changed, 79 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20a528e991..11fc91deef 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Every screenshot is RustGIS itself, rendered offscreen by `cargo run -p rustgis- | **Imagery** | Ortho and reality mapping, pixel classification (k-means, minimum distance, a trainable neural network), mensuration, hosted imagery tiles | | **Layouts and reports** | Page layouts with map frames, legends, scale bars, grids, bar and column charts and map series; publication sheets and figures in one command, format panes, guides, snapping and element locks; reports with groups, statistics, charts and subreports; vector PDF and SVG, and GeoPDF with [supported map frames](docs/user-guide/layouts.md#layouts) georeferenced; presentations (HTML slideshow, PDF); notebooks (Jupyter in and out) | | **Sharing** | PNG export at up to 600 DPI; PDF; web map pages, OGC API Features collections, MapLibre styles, glTF and STL scenes, vector and raster PMTiles, the map view as a GeoTIFF placed on the ground (desktop), locators; the web app embedded in a page (`?embed`); project, map and mobile map packages; offline areas with sync | -| **AI Assistant** | Ask about your data or tell the map what to do in plain language, attaching pictures and letting it look at the map and layouts, with Anthropic, OpenAI (a key, or your ChatGPT plan by signing in on the desktop or command line), Gemini, Mistral, OpenRouter and other gateways, Ollama or any OpenAI-compatible model; also `rustgis-cli ask`, and an [MCP server](docs/mcp.md) (`rustgis-cli mcp`) for Claude Code, Cursor, VS Code and other agents; skills; on the desktop, agents such as Claude Code and Codex started from the app, and external AI clients driving the open app; keys optionally remembered in the system keychain on the desktop (in the web app, unencrypted in the browser's storage) | +| **AI Assistant** | Ask about your data or tell the map what to do in plain language, attaching pictures and letting it look at the map and layouts, with Anthropic, OpenAI (a key, or your ChatGPT plan by signing in on the desktop or command line), Gemini, Mistral, OpenRouter and other gateways, Ollama (on your computer or Ollama Cloud) or any OpenAI-compatible model; also `rustgis-cli ask`, and an [MCP server](docs/mcp.md) (`rustgis-cli mcp`) for Claude Code, Cursor, VS Code and other agents; skills; on the desktop, agents such as Claude Code and Codex started from the app, and external AI clients driving the open app; keys optionally remembered in the system keychain on the desktop (in the web app, unencrypted in the browser's storage) | | **Plugins** | Sandboxed WebAssembly [plugins](docs/plugins.md) add commands, tools and ribbon tabs; install them from [plugins.rustgis.app](https://plugins.rustgis.app) on the desktop, command line and web. Process plugins (desktop and command line) run as programs (with Python environments RustGIS makes), in the background or for the whole session; panels offer trees, dropdowns, date pickers and sliders | | **Python** | The [`rustgis` package](docs/python.md) on PyPI: the engine in-process, `rustgis.Map` in Jupyter and `rustgis.qt.MapWidget` in Qt applications | | **Interface** | Layers, Browser and Data Sources panes as tabs, command search (Ctrl+K), keyboard shortcuts, dark mode, custom themes (desktop) and an interface scale, a customizable ribbon and Quick Access Toolbar, linked side-by-side maps, a History pane of tool runs and the session log, autosave and crash recovery (desktop), Check for Updates (desktop), 22 languages | diff --git a/apps/rustgis-cli/src/main.rs b/apps/rustgis-cli/src/main.rs index e3fc54e4bb..a32d71a83e 100644 --- a/apps/rustgis-cli/src/main.rs +++ b/apps/rustgis-cli/src/main.rs @@ -13,7 +13,7 @@ //! rustgis-cli run … --strict [--allow dropped.ring] # exit 3 when a command loses data (see the guide's loss codes) //! rustgis-cli run … --threads 4 # the most threads one piece of work uses (default: the cores, up to 16) //! rustgis-cli ask [--sample | --project p.rgis | --data f.geojson …] "Which cities have over 10 million people?" \ -//! [--provider anthropic|openai|chatgpt|gemini|openrouter|ollama|custom|requesty|trustedrouter|opper|mistral] [--model M] [--base-url URL] [--yes] [--save out.rgis] [--trace log.txt] +//! [--provider anthropic|openai|chatgpt|gemini|openrouter|ollama|custom|requesty|trustedrouter|opper|mistral|ollama-cloud] [--model M] [--base-url URL] [--yes] [--save out.rgis] [--trace log.txt] //! rustgis-cli ask --sample "Style the countries like this map" --image reference.png # pictures go with the request (up to 4) //! rustgis-cli ask --models [--provider P] # list the provider's models //! rustgis-cli ask --accounts | --account CLIENT_ID # list or select a saved registration diff --git a/crates/assistant/src/provider.rs b/crates/assistant/src/provider.rs index 3eb501ecdf..9eab8dc702 100644 --- a/crates/assistant/src/provider.rs +++ b/crates/assistant/src/provider.rs @@ -193,6 +193,20 @@ pub const PRESETS: &[Preset] = &[ key_url: "https://console.mistral.ai/api-keys", login: false, }, + Preset { + id: "ollama-cloud", + description: "Open models that Ollama runs in its cloud, in the United States. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata.", + label: "Ollama Cloud", + api: Api::OpenAi, + base_url: "https://ollama.com/v1", + // In the cloud catalog with tools; direct requests use the catalog's names, without `-cloud`. + model: "gpt-oss:120b", + key_env: &["OLLAMA_API_KEY"], + url_env: "", + keyless: false, + key_url: "https://ollama.com/settings/keys", + login: false, + }, ]; /// The preset with this id. diff --git a/crates/assistant/src/tests.rs b/crates/assistant/src/tests.rs index 79b7c5daca..55d07f15e8 100644 --- a/crates/assistant/src/tests.rs +++ b/crates/assistant/src/tests.rs @@ -5586,6 +5586,60 @@ fn mistral_lists_models_with_a_bearer_key() { assert!(req.headers.contains(&("Authorization".into(), "Bearer k".into()))); } +#[test] +fn ollama_cloud_needs_a_key_from_ollama_api_key_and_comes_after_the_other_keys() { + let p = preset("ollama-cloud").expect("the Ollama Cloud preset"); + assert_eq!((p.api, p.base_url, p.key_env, p.url_env), (Api::OpenAi, "https://ollama.com/v1", &["OLLAMA_API_KEY"][..], "")); + assert!(!p.keyless && !p.login && p.key_url.starts_with("https://ollama.com/")); + let mut c = cfg("ollama-cloud"); + c.key.clear(); + assert_eq!(c.missing(), Some("Enter an API key.")); + // The local server stays keyless, and an Ollama Cloud key never takes another provider's place. + assert!(preset("ollama").is_some_and(|p| p.keyless && p.key_env.is_empty())); + let keyed = |ids: &'static [&'static str]| { + move |id: &str| Config { key: if ids.contains(&id) { "k".into() } else { String::new() }, ..cfg(id) } + }; + assert_eq!(first_keyed(keyed(&["ollama-cloud", "mistral"])), Some("mistral")); + assert_eq!(first_keyed(keyed(&["ollama-cloud"])), Some("ollama-cloud")); +} + +#[test] +fn ollama_cloud_sends_chat_and_model_requests_to_ollama_com_with_a_bearer_key() { + let s = sample(); + let mut a = Agent::new(cfg("ollama-cloud"), &s); + let Step::Send(req) = a.ask("what layers?", &s) else { panic!("expected a request") }; + assert_eq!(req.url, "https://ollama.com/v1/chat/completions"); + assert!(req.headers.contains(&("Authorization".into(), "Bearer k".into()))); + let b = body(&req); + assert_eq!(b["model"], "gpt-oss:120b"); + assert!(b["tools"].as_array().is_some_and(|t| t.iter().any(|t| t["function"]["name"] == "list_layers"))); + let models = models_request(&cfg("ollama-cloud")); + assert_eq!(models.url, "https://ollama.com/v1/models"); + assert!(models.headers.contains(&("Authorization".into(), "Bearer k".into()))); + // ollama.com lists its catalog in OpenAI's format. + let listed = + ok(json!({"object": "list", "data": [{"id": "gpt-oss:120b", "object": "model"}, {"id": "gemma4:31b", "object": "model"}]})); + assert_eq!(parse_models(Api::OpenAi, &listed.unwrap()), Ok(vec!["gemma4:31b".to_string(), "gpt-oss:120b".to_string()])); +} + +#[test] +fn ollama_cloud_runs_a_tool_call_and_answers() { + let mut s = sample(); + let mut a = Agent::new(cfg("ollama-cloud"), &s); + let Step::Send(_) = a.ask("what layers?", &s) else { panic!("expected a request") }; + // A reply as ollama.com sends it: empty content, reasoning beside the call. + let mut reply = call("call_1", "list_layers", json!({})); + reply["choices"][0]["message"]["content"] = json!(""); + reply["choices"][0]["message"]["reasoning"] = json!("List them."); + let Step::Send(req) = a.receive(a.generation(), ok(reply), &mut s) else { panic!("expected a follow-up") }; + assert_eq!(req.url, "https://ollama.com/v1/chat/completions"); + let msgs = body(&req)["messages"].as_array().cloned().unwrap_or_default(); + let result = msgs.iter().find(|m| m["role"] == "tool").expect("the tool result is sent back"); + assert_eq!(result["tool_call_id"], "call_1"); + assert!(result["content"].to_string().contains("Cities")); + assert_eq!(a.receive(a.generation(), ok(say("Two layers.")), &mut s), Step::Done); +} + #[test] fn mistral_typed_stream_preserves_visible_text_thinking_and_signatures_for_replay() { let thinking = json!({"type":"thinking", "thinking":[{"type":"text","text":"private thought"}], "signature":"signed"}); diff --git a/docs/cli.md b/docs/cli.md index 0da7095582..5fe915332f 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -188,7 +188,7 @@ rustgis-cli ask --login # sign in with ChatGPT to us rustgis-cli ask --sample --provider chatgpt "Zoom to Tokyo" ``` -The provider is `--provider` (`anthropic`, `openai`, `chatgpt`, `gemini`, `openrouter`, `ollama`, `custom`, `requesty`, `trustedrouter`, `opper`, `mistral`), +The provider is `--provider` (`anthropic`, `openai`, `chatgpt`, `gemini`, `openrouter`, `ollama`, `custom`, `requesty`, `trustedrouter`, `opper`, `mistral`, `ollama-cloud`), else `RUSTGIS_ASSISTANT_PROVIDER`, else the first with a key in the environment, else the app's saved provider when `--use-saved-secrets` is set, else Ollama. ChatGPT sign-in is used only when that provider is selected. Account management and `--models` do not read saved API keys: diff --git a/docs/user-guide/assistant.md b/docs/user-guide/assistant.md index d54ad9fc4b..0469f9d186 100644 --- a/docs/user-guide/assistant.md +++ b/docs/user-guide/assistant.md @@ -110,12 +110,13 @@ Click the model name or the gear to open the settings. The assistant works with: | ChatGPT (sign in) | OpenAI's models, billed to your ChatGPT plan. On a personal plan, ChatGPT's "Improve the model" setting decides whether requests are used for training; Business, Enterprise and Edu plans aren't trained on by default. | the first model in your account’s current catalog | none: **Continue with ChatGPT** to use your ChatGPT plan (desktop app and command line) | | Google Gemini | Google's own API. With a free key, Google may use requests to improve its products and people may read them; a Cloud project with billing turns that off. In the EEA, Switzerland and the UK, paid-service data terms also cover free use. | `gemini-3.8-flash` | [aistudio.google.com](https://aistudio.google.com/apikey), or `GEMINI_API_KEY` / `GOOGLE_API_KEY` | | OpenRouter | A US gateway to hundreds of models. OpenRouter doesn't keep request content by default. With Private routing on (the default), RustGIS asks it to skip endpoints that may train on requests. | `openrouter/auto` | [openrouter.ai](https://openrouter.ai/keys), or `OPENROUTER_API_KEY` | -| Ollama (local) | Models you run with Ollama on this computer or a server of your own. Requests go to the server at the chosen address; its models and configuration determine any onward use. | `qwen3` | none; the server from `OLLAMA_BASE_URL` (default `http://localhost:11434`) | +| Ollama (local) | Models you run with Ollama on this computer or a server of your own. Requests go to the server at the chosen address; its models and configuration determine any onward use. | `qwen3` | none; the server from `OLLAMA_BASE_URL` (default `http://localhost:11434`). Signed in with `ollama signin`, it also runs the `:cloud` models it lists | | OpenAI-compatible | Any service or local server that speaks OpenAI's API. What happens to requests is up to the service at the chosen address. | — | LM Studio, vLLM, llama.cpp…: `OPENAI_COMPATIBLE_BASE_URL` (default `http://localhost:1234/v1`), with an optional `OPENAI_COMPATIBLE_API_KEY` | | Requesty | A UK gateway to hundreds of models, which can move to another service when one fails. It logs requests up to 30 days by default; you can turn that off for each key. Some upstreams train on requests on paid plans too; Requesty may also train on free-plan requests. | `anthropic/claude-sonnet-5-5` | [app.requesty.ai](https://app.requesty.ai/api-keys), or `REQUESTY_API_KEY`; for the EU, set the **Address** to `https://router.eu.requesty.ai/v1` | | TrustedRouter | A US gateway to models from many services, run on servers whose software can be checked independently. The gateway doesn't keep request content; each service behind it follows its own policy and may keep or train on requests. | `trustedrouter/auto` | [trustedrouter.com](https://trustedrouter.com), or `TRUSTEDROUTER_API_KEY` | | Opper | A Swedish gateway to hundreds of models, built for keeping data in the EU. It doesn't store request content by default, but a model name without a route prefix may run outside the EU. | `claude-sonnet-5-5` | [platform.opper.ai](https://platform.opper.ai), or `OPPER_API_KEY` | | Mistral | Mistral AI's own API, from France. Paid API requests aren't used for training by default; on a free account, turn training off under Privacy in the admin panel. Labs and Preview models may train regardless of that setting. | `mistral-small-2603` | [console.mistral.ai](https://console.mistral.ai/api-keys), or `MISTRAL_API_KEY`; for [EU inference](https://docs.mistral.ai/inference/regional-inference), set **Address** to `https://api.eu.mistral.ai/v1` (supported models only; 10% surcharge) | +| Ollama Cloud | Open models that Ollama runs in its cloud, in the United States. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata. | `gpt-oss:120b` | [ollama.com](https://ollama.com/settings/keys), or `OLLAMA_API_KEY`; model names are the cloud catalog's, without `-cloud` | Last checked: November 2026. These descriptions apply to the presets' default addresses. If **Address** is changed, the chosen service's policy applies. These summaries aren't guarantees @@ -126,8 +127,9 @@ as OpenAI documents for Codex. See the providers' own policies: [Anthropic](http [ChatGPT/Codex](https://help.openai.com/en/articles/7730893-data-controls-in-chatgpt), [Gemini](https://ai.google.dev/gemini-api/terms), [OpenRouter](https://openrouter.ai/privacy), [Requesty privacy](https://www.requesty.ai/privacy) and [training terms](https://www.requesty.ai/terms), [TrustedRouter](https://trustedrouter.com/privacy), -[Opper](https://opper.ai/security-overview), and -[Mistral](https://legal.mistral.ai/terms/commercial-terms-of-service/). +[Opper](https://opper.ai/security-overview), +[Mistral](https://legal.mistral.ai/terms/commercial-terms-of-service/), and +[Ollama](https://ollama.com/privacy). The ↻ button lists the provider's models. The provider and model you last chose in the settings are used at start. Until you choose one, `RUSTGIS_ASSISTANT_PROVIDER` and @@ -438,7 +440,9 @@ Plain HTTP is only used for servers on your computer or local network. In the web app, the browser calls the provider directly. Anthropic, OpenAI, Gemini, OpenRouter, Requesty, TrustedRouter, Opper and Mistral accept that; a local Ollama server must allow the page's origin -(`OLLAMA_ORIGINS=https://web.rustgis.app ollama serve`). +(`OLLAMA_ORIGINS=https://web.rustgis.app ollama serve`). Ollama Cloud refuses requests from +web pages, so in the web app use its models through a local Ollama server signed in with +`ollama signin`. ## Retries and long conversations From 2974ee390fc84daf0b8ff1b74ab9718ccedfa35d Mon Sep 17 00:00:00 2001 From: elpidioassinaturas Date: Sun, 29 Nov 2026 18:44:49 -0300 Subject: [PATCH 2/3] fix(assistant): OLLAMA_API_KEY alone doesn't choose Ollama Cloud The variable is often set where only a local Ollama server runs, so first_keyed skips the preset: the command line keeps the local default and the desktop its usual first choice. The desktop now uses first_keyed instead of its own copy of the rule. Co-Authored-By: Claude Opus 5.5 --- crates/assistant/src/provider.rs | 6 ++++-- crates/assistant/src/tests.rs | 8 ++++++-- crates/ui-egui/src/assistant.rs | 5 +++-- docs/cli.md | 3 ++- docs/user-guide/assistant.md | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/crates/assistant/src/provider.rs b/crates/assistant/src/provider.rs index 9eab8dc702..60a563d3ca 100644 --- a/crates/assistant/src/provider.rs +++ b/crates/assistant/src/provider.rs @@ -349,9 +349,11 @@ pub fn saved_provider(prefs: &Map) -> Option<&'static str> { } /// The first key-using provider whose API key `config` finds (the environment's, for -/// `Config::from_env`). A sign-in is chosen, not assumed. +/// `Config::from_env`). A sign-in is chosen, not assumed, and so is Ollama Cloud: its +/// `OLLAMA_API_KEY` is often set where only a local Ollama server runs, and alone it must not send +/// requests to ollama.com instead. pub fn first_keyed(config: impl Fn(&str) -> Config) -> Option<&'static str> { - PRESETS.iter().find(|p| !p.login && !config(p.id).key.is_empty()).map(|p| p.id) + PRESETS.iter().find(|p| !p.login && p.id != "ollama-cloud" && !config(p.id).key.is_empty()).map(|p| p.id) } /// The provider a command-line run uses: the explicit choice, then the environment's choice, then diff --git a/crates/assistant/src/tests.rs b/crates/assistant/src/tests.rs index 55d07f15e8..e3ad187523 100644 --- a/crates/assistant/src/tests.rs +++ b/crates/assistant/src/tests.rs @@ -5587,7 +5587,7 @@ fn mistral_lists_models_with_a_bearer_key() { } #[test] -fn ollama_cloud_needs_a_key_from_ollama_api_key_and_comes_after_the_other_keys() { +fn ollama_cloud_needs_a_key_from_ollama_api_key_and_is_never_chosen_by_it_alone() { let p = preset("ollama-cloud").expect("the Ollama Cloud preset"); assert_eq!((p.api, p.base_url, p.key_env, p.url_env), (Api::OpenAi, "https://ollama.com/v1", &["OLLAMA_API_KEY"][..], "")); assert!(!p.keyless && !p.login && p.key_url.starts_with("https://ollama.com/")); @@ -5600,7 +5600,11 @@ fn ollama_cloud_needs_a_key_from_ollama_api_key_and_comes_after_the_other_keys() move |id: &str| Config { key: if ids.contains(&id) { "k".into() } else { String::new() }, ..cfg(id) } }; assert_eq!(first_keyed(keyed(&["ollama-cloud", "mistral"])), Some("mistral")); - assert_eq!(first_keyed(keyed(&["ollama-cloud"])), Some("ollama-cloud")); + // `OLLAMA_API_KEY` is often set where only a local server runs: on its own it must not move + // requests to ollama.com, so the command line keeps the local default. + assert_eq!(first_keyed(keyed(&["ollama-cloud"])), None); + assert_eq!(choose(None, None, first_keyed(keyed(&["ollama-cloud"])), None), "ollama"); + assert_eq!(choose(Some("ollama-cloud"), None, None, None), "ollama-cloud"); } #[test] diff --git a/crates/ui-egui/src/assistant.rs b/crates/ui-egui/src/assistant.rs index b33d1defb6..29551329e1 100644 --- a/crates/ui-egui/src/assistant.rs +++ b/crates/ui-egui/src/assistant.rs @@ -297,8 +297,9 @@ pub(crate) fn ensure_loaded(app: &mut RustGisApp, ctx: &egui::Context) { let provider = pref(app, provider::PROVIDER_PREF) .or_else(|| std::env::var("RUSTGIS_ASSISTANT_PROVIDER").ok()) .filter(|p| provider::preset(p).is_some()) - // The first provider with a key in the environment (a ChatGPT sign-in is chosen, not assumed). - .or_else(|| PRESETS.iter().find(|p| !p.login && !Config::from_env(p.id).key.is_empty()).map(|p| p.id.to_string())) + // The first provider with a key in the environment (a ChatGPT sign-in and Ollama Cloud are + // chosen, not assumed). + .or_else(|| provider::first_keyed(Config::from_env).map(str::to_string)) .unwrap_or_else(|| "anthropic".into()); let mut cfg = load_config(app, &provider, ctx); #[cfg(not(target_arch = "wasm32"))] diff --git a/docs/cli.md b/docs/cli.md index 5fe915332f..1c1bfa985c 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -189,7 +189,8 @@ rustgis-cli ask --sample --provider chatgpt "Zoom to Tokyo" ``` The provider is `--provider` (`anthropic`, `openai`, `chatgpt`, `gemini`, `openrouter`, `ollama`, `custom`, `requesty`, `trustedrouter`, `opper`, `mistral`, `ollama-cloud`), -else `RUSTGIS_ASSISTANT_PROVIDER`, else the first with a key in the environment, else the app's +else `RUSTGIS_ASSISTANT_PROVIDER`, else the first with a key in the environment (not Ollama Cloud, +which `OLLAMA_API_KEY` alone never selects), else the app's saved provider when `--use-saved-secrets` is set, else Ollama. ChatGPT sign-in is used only when that provider is selected. Account management and `--models` do not read saved API keys: model listing uses environment API keys (or the selected ChatGPT sign-in), whereas a prompt diff --git a/docs/user-guide/assistant.md b/docs/user-guide/assistant.md index 0469f9d186..0e3cd6463d 100644 --- a/docs/user-guide/assistant.md +++ b/docs/user-guide/assistant.md @@ -134,7 +134,7 @@ as OpenAI documents for Codex. See the providers' own policies: [Anthropic](http The ↻ button lists the provider's models. The provider and model you last chose in the settings are used at start. Until you choose one, `RUSTGIS_ASSISTANT_PROVIDER` and `RUSTGIS_ASSISTANT_MODEL` pick them, and otherwise the desktop uses the first provider with a key -in the environment, falling back to Anthropic when none has a key. ChatGPT sign-in is used +in the environment (`OLLAMA_API_KEY` alone never selects Ollama Cloud), falling back to Anthropic when none has a key. ChatGPT sign-in is used only when you choose that provider. Saved settings win over the environment. The **Address** field changes the endpoint for providers other than ChatGPT; use the OpenAI-compatible API path (usually `/v1`) for local servers. Models that call tools well give the best results; From 7f580d04053dc23f3d07819115e4b568d374837f Mon Sep 17 00:00:00 2001 From: elpidioassinaturas Date: Sun, 29 Nov 2026 18:58:15 -0300 Subject: [PATCH 3/3] fix(assistant): web build import and Ollama Cloud hosting regions PRESETS is used only by the desktop's key migration now, so the web build no longer imports it. Ollama hosts its cloud mainly in the United States and may route to Europe; the preset and the guide say so. Co-Authored-By: Claude Opus 5.5 --- crates/assistant/src/provider.rs | 2 +- crates/ui-egui/src/assistant.rs | 4 ++-- docs/user-guide/assistant.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/assistant/src/provider.rs b/crates/assistant/src/provider.rs index 60a563d3ca..0817553e40 100644 --- a/crates/assistant/src/provider.rs +++ b/crates/assistant/src/provider.rs @@ -195,7 +195,7 @@ pub const PRESETS: &[Preset] = &[ }, Preset { id: "ollama-cloud", - description: "Open models that Ollama runs in its cloud, in the United States. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata.", + description: "Open models that Ollama runs in its cloud, mainly in the United States and at times in Europe. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata.", label: "Ollama Cloud", api: Api::OpenAi, base_url: "https://ollama.com/v1", diff --git a/crates/ui-egui/src/assistant.rs b/crates/ui-egui/src/assistant.rs index 29551329e1..d312c50772 100644 --- a/crates/ui-egui/src/assistant.rs +++ b/crates/ui-egui/src/assistant.rs @@ -16,7 +16,7 @@ //! Requests go out off the frame: on a thread on the desktop, through `Services::http` (the //! browser's fetch) on the web. Their replies are taken in by [`RustGisApp::logic`] each frame. -use rustgis_assistant::{Agent, Config, Entry, HttpRequest, HttpResponse, PRESETS, Step, chatgpt, provider}; +use rustgis_assistant::{Agent, Config, Entry, HttpRequest, HttpResponse, Step, chatgpt, provider}; use crate::{RustGisApp, Slot}; @@ -369,7 +369,7 @@ fn migrate_keys(app: &mut RustGisApp, ctx: &egui::Context) { if !provider::remembers_keys(pref(app, provider::REMEMBER_KEY_PREF).as_deref()) { return; } - for p in PRESETS.iter().filter(|p| !p.login) { + for p in rustgis_assistant::PRESETS.iter().filter(|p| !p.login) { if let Some(legacy) = pref(app, &format!("assistant_key_{}", p.id)) { app.assistant.keys.load(p.id, "", Some(legacy), true, app.services.secrets.clone(), ctx); } diff --git a/docs/user-guide/assistant.md b/docs/user-guide/assistant.md index 0e3cd6463d..2293bd4f7a 100644 --- a/docs/user-guide/assistant.md +++ b/docs/user-guide/assistant.md @@ -116,7 +116,7 @@ Click the model name or the gear to open the settings. The assistant works with: | TrustedRouter | A US gateway to models from many services, run on servers whose software can be checked independently. The gateway doesn't keep request content; each service behind it follows its own policy and may keep or train on requests. | `trustedrouter/auto` | [trustedrouter.com](https://trustedrouter.com), or `TRUSTEDROUTER_API_KEY` | | Opper | A Swedish gateway to hundreds of models, built for keeping data in the EU. It doesn't store request content by default, but a model name without a route prefix may run outside the EU. | `claude-sonnet-5-5` | [platform.opper.ai](https://platform.opper.ai), or `OPPER_API_KEY` | | Mistral | Mistral AI's own API, from France. Paid API requests aren't used for training by default; on a free account, turn training off under Privacy in the admin panel. Labs and Preview models may train regardless of that setting. | `mistral-small-2603` | [console.mistral.ai](https://console.mistral.ai/api-keys), or `MISTRAL_API_KEY`; for [EU inference](https://docs.mistral.ai/inference/regional-inference), set **Address** to `https://api.eu.mistral.ai/v1` (supported models only; 10% surcharge) | -| Ollama Cloud | Open models that Ollama runs in its cloud, in the United States. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata. | `gpt-oss:120b` | [ollama.com](https://ollama.com/settings/keys), or `OLLAMA_API_KEY`; model names are the cloud catalog's, without `-cloud` | +| Ollama Cloud | Open models that Ollama runs in its cloud, mainly in the United States and at times in Europe. Ollama says it doesn't store or log prompts and responses and doesn't train on them; it keeps usage metadata. | `gpt-oss:120b` | [ollama.com](https://ollama.com/settings/keys), or `OLLAMA_API_KEY`; model names are the cloud catalog's, without `-cloud` | Last checked: November 2026. These descriptions apply to the presets' default addresses. If **Address** is changed, the chosen service's policy applies. These summaries aren't guarantees @@ -129,7 +129,7 @@ as OpenAI documents for Codex. See the providers' own policies: [Anthropic](http [Requesty privacy](https://www.requesty.ai/privacy) and [training terms](https://www.requesty.ai/terms), [TrustedRouter](https://trustedrouter.com/privacy), [Opper](https://opper.ai/security-overview), [Mistral](https://legal.mistral.ai/terms/commercial-terms-of-service/), and -[Ollama](https://ollama.com/privacy). +[Ollama privacy](https://ollama.com/privacy) and [hosting](https://ollama.com/pricing). The ↻ button lists the provider's models. The provider and model you last chose in the settings are used at start. Until you choose one, `RUSTGIS_ASSISTANT_PROVIDER` and