#15: pass VLM/VISION/OPENROUTER api keys into dotty-behaviour#98
Open
BrettKinny wants to merge 2 commits into
Open
#15: pass VLM/VISION/OPENROUTER api keys into dotty-behaviour#98BrettKinny wants to merge 2 commits into
BrettKinny wants to merge 2 commits into
Conversation
Add a 🤖 blockquote between the tagline and the existing⚠️ heads-up. First substantive thing a visitor reads: most of the code and nearly all of the docs in this repo were written by AI agents under direction, framed honestly so the project's nature is clear up-front. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Post-#36 the active vision path is dotty-behaviour/dispatch/vlm.py, which inherited the loud-error contract from bridge.py's hardened _call_vision_api. But dotty-behaviour/docker-compose.yml didn't pass any of VLM_API_KEY / VISION_API_KEY / OPENROUTER_API_KEY into the container — so a fresh deploy resolves all three to empty inside the container even with a populated host .env, and every photo intent falls through to the VLM_OFFLINE_SENTINEL. - Add ${VAR:-} interpolation for all four (incl. AUDIO_CAPTION_API_KEY) so the compose picks them up from the shell that runs `docker compose up` without erroring when none are set. - Document the env-var requirement in dotty-behaviour/README.md under "Build + run on Unraid". Closes #15. The bridge-side hardening (aa2d8ba) and the original RPi-side env-var TODO were already moot post-#36 RPi decommission; this commit closes the post-#36 manifestation of the same bug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to restore/enable the dotty-behaviour container’s vision path by ensuring VLM/Vision/OpenRouter (and audio caption) API key environment variables are available inside the container, and documenting the required deployment configuration.
Changes:
- Add API-key environment variable passthroughs to
dotty-behaviour/docker-compose.yml. - Document the vision-key environment variable requirements and fallback behavior in
dotty-behaviour/README.md. - Add an “AI-assisted project” note to the repository root
README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Adds an AI-assisted-project disclosure note (not described in the PR metadata). |
| dotty-behaviour/README.md | Documents vision API key requirements/fallback behavior for Unraid deploys. |
| dotty-behaviour/docker-compose.yml | Adds environment variable passthroughs for vision/audio API keys (currently breaks fallback behavior when some keys are unset). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+49
to
+52
| - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-} | ||
| - VISION_API_KEY=${VISION_API_KEY:-} | ||
| - VLM_API_KEY=${VLM_API_KEY:-} | ||
| - AUDIO_CAPTION_API_KEY=${AUDIO_CAPTION_API_KEY:-} |
Comment on lines
+51
to
+53
| confabulating a description. Set the key in the host shell before | ||
| `docker compose up`, or pass `--env-file <path>` at a `.env` that | ||
| contains it. |
|
|
||
| **Your self-hosted [StackChan](https://github.com/m5stack/StackChan) robot assistant — kid-safe by default, hackable by design, private by architecture.** | ||
|
|
||
| > 🤖 **AI-assisted project.** Most of the code and nearly all of the docs in this repo were written by AI agents (primarily Claude Code) under my direction. I've been coding professionally for 15+ years; Dotty is one of a few side projects I'm using to learn the current generation of AI/LLM tooling first-hand — what the tools do well, where they break, and how to drive them. Feedback on the output very welcome. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The post-#36 manifestation of #15. The bridge-side hardening (
aa2d8ba, 2026-05-16) and the original RPi-side env-var TODO were both rendered moot by #36's RPi decommission — but the active vision path moved todotty-behaviour/dispatch/vlm.py, anddotty-behaviour/docker-compose.ymlhad no env passthrough for any of the API-key variables. A fresh deploy with a populated host.envstill resolves all three ofVLM_API_KEY/VISION_API_KEY/OPENROUTER_API_KEYto empty inside the container, so every photo intent falls through toVLM_OFFLINE_SENTINELand vision is silently broken.Changes
dotty-behaviour/docker-compose.yml— add${VAR:-}interpolation forOPENROUTER_API_KEY,VISION_API_KEY,VLM_API_KEY, andAUDIO_CAPTION_API_KEY. The:-default keepsdocker compose upworking when none are set (container starts but vision returns the offline sentinel — the documented loud-error contract).dotty-behaviour/README.md— document the requirement under "Build + run on Unraid", explaining the fallback order and what happens when keys are missing.Test plan
docker compose -f dotty-behaviour/docker-compose.yml configparses cleanly and shows all four keys in the normalized output.dispatch/vlm.py'sVLMClient.describe_imagealready returnsVLM_OFFLINE_SENTINELwhenapi_keyis empty (lines 82-88), so unset keys still produce the loud-error contract — no behavioural regression on misconfigured deploys.Closes #15
🤖 Generated with Claude Code