Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs: explain OpenCode Go session headers and overrides (#10921)

Shahmir Varqhafa0c53a2b089
diff --git a/docs/guides/configuration/llm_providers.md b/docs/guides/configuration/llm_providers.md
index 6a3f953eb9..ede5000fea 100644
--- a/docs/guides/configuration/llm_providers.md
+++ b/docs/guides/configuration/llm_providers.md
@@ -381,6 +381,10 @@ base_url = "https://opencode.ai/zen/go/v1/" # Optional, this is the default
You can also set the `OPENCODE_API_KEY` environment variable instead of `api_key`. See available models at the [OpenCode Go documentation](https://opencode.ai/docs/go/). Make sure to prepend `opencode-go/` to the model slug.
+marimo automatically sends `User-Agent: marimo/<version>`, `x-opencode-client: marimo`, and a stable `x-opencode-session` header for OpenCode Go.
+marimo derives the session header from the conversation ID, with a notebook-session fallback.
+You can override these headers using `extra_headers` in `[ai.opencode_go]`.
+
### Local models with Ollama { #using-ollama }
Run open-source LLMs locally and connect via an OpenAI‑compatible API.