Skip to content

Self-hosting docs overhaul: single-provider default, restructured config guide#510

Merged
VVoruganti merged 23 commits intomainfrom
abigail/self-hosting-docs-overhaul
Apr 8, 2026
Merged

Self-hosting docs overhaul: single-provider default, restructured config guide#510
VVoruganti merged 23 commits intomainfrom
abigail/self-hosting-docs-overhaul

Conversation

@erosika
Copy link
Copy Markdown
Contributor

@erosika erosika commented Apr 6, 2026

Summary

  • Simplify self-hosting setup to one OpenAI-compatible endpoint + one model (instead of three vendor keys)
  • Restructure config guide: defaults first, model tiers and alternative providers as upgrade path
  • Add production compose file, Docker build troubleshooting, reverse proxy examples (Caddy/nginx)
  • Add model tier recommendations, thinking budget docs for non-Anthropic providers
  • Fix healthcheck db name, standardize connection URIs (from Self-Hosting Docs Updates and Additions #460)
  • Link to community quick-start (elkimek/honcho-self-hosted)

Supersedes #460 (includes Vineeth's original 3 commits).

Test plan

  • Follow self-hosting.mdx cold on a fresh machine with only an OpenRouter key
  • Verify all cross-references between self-hosting, configuration, and troubleshooting pages resolve
  • Confirm docker-compose.prod.yml starts cleanly
  • Check Mintlify renders all pages without errors

Summary by CodeRabbit

  • New Features

    • Added a /health monitoring endpoint.
  • Documentation

    • Added a Troubleshooting page and overhauled self-hosting/configuration docs with clearer LLM setup, model-tiering, thinking-budget guidance, condensed references, and consistent DB URI examples.
  • Chores

    • Unified environment config to a single OpenAI-compatible provider model with explicit per-feature provider/model placeholders.
    • Switched recommended formatter to ruff and raised minimum Python/uv versions.
    • Updated compose defaults (loopback ports, caching, restart policies, DB tuning, volumes) and adjusted container health probe.

VVoruganti and others added 10 commits April 1, 2026 11:30
- .env.template: lead with provider options (custom, vllm, google,
  anthropic, openai, groq) instead of baking in vendor-specific keys.
  All provider/model settings commented out so server fails fast until
  configured. Separate endpoint config from per-feature provider+model
  from tuning knobs.
- docker-compose.yml.example: fix healthcheck -d honcho -> -d postgres
  to match POSTGRES_DB=postgres.
- config.toml.example: reorder and document LLM key section with
  OpenRouter and vLLM examples.
- self-hosting.mdx: replace multi-vendor key table with provider options
  table. Add examples for OpenRouter, vLLM/Ollama, and direct vendor
  keys. Remove duplicated key lists from Docker/manual setup sections.
- configuration.mdx: replace scattered provider docs with provider types
  table. Fix Docker Compose snippet to match actual compose file. Note
  code defaults as fallback, not recommended path.
- troubleshooting.mdx: add alternative provider issues section (custom
  provider config, model name format, Docker localhost, structured
  output failures).
- Document BuildKit requirement (RUN --mount syntax)
- AppArmor/SELinux blocking Docker builds on Linux
- Volume mount UID mismatch between host and container app user
- Note in self-hosting docs that Docker path builds from source
- Add docker-compose.prod.yml for VM/server deployment: no source
  mounts, restart policies, 127.0.0.1-bound ports, cache enabled
- Add model tier guidance and community quick-start link to self-hosting
- Document THINKING_BUDGET_TOKENS gotcha for non-Anthropic providers
- Add reverse proxy examples (Caddy + nginx) to production section
- Add backup/restore commands to production considerations
Self-hosting page now defaults to one OpenAI-compatible endpoint
with one model for all features. Moved model tiers, alternative
providers, and per-feature tuning into the configuration guide.
Eliminated duplicate config priority sections, dev/prod split,
and redundant TOML examples.
Copy link
Copy Markdown
Collaborator

@VVoruganti VVoruganti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directionally good, but still some inconsistencies that I think people would run into

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file separates concerns by trying to move all of the model definitions under one section rather than keeping them in their respective modules.

Also would suffer from the same failure mode of crashing on an initial run because it doesn't have the properly api keys for gemini and that is still set as the default

… in .env.template

Single docker-compose.yml.example with dev sections commented out.
Moved PROVIDER and MODEL back alongside each feature in .env.template
so settings stay colocated with their module. Updated self-hosting
docs to reference single compose file.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Refactors LLM env/configs to a provider+model pattern and enforces per-feature env vars; tightens Docker/compose defaults (loopback ports, named Redis volume, cache flag); updates docs (new troubleshooting page, DB URI and minimum versions); and adds a minimal GET /health endpoint returning {"status":"ok"}.

Changes

Cohort / File(s) Summary
Env & Config Templates
\.env.template, config.toml.example
Unifies LLM config to OpenAI‑compatible base URL/key vars, adds LLM_EMBEDDING_PROVIDER=openrouter, requires per-feature provider/model and thinking-budget envs (DERIVER_*, DIALECTIC_LEVELS__*__*, SUMMARY_*, DREAM_*), removes prior per-vendor required keys.
Docker & Compose
Dockerfile, docker-compose.yml.example
Dockerfile healthcheck -> /health; compose now builds locally, binds ports to 127.0.0.1, disables default dev mounts/monitoring (commented), switches Redis to named volume, changes restart policies, lowers DB max_connections, removes POSTGRES_HOST_AUTH_METHOD, adds CACHE_ENABLED.
Runtime Code
src/main.py
Added GET /health endpoint returning static {"status":"ok"} for health checks.
Documentation (README & CONTRIBUTING)
README.md, CONTRIBUTING.md
Bumped minimum Python/uv versions; changed DB examples to postgresql+psycopg:// and DB name to postgres; replaced Black recommendation with ruff for linting/formatting.
Docs - v2/v3 & Index
docs/docs.json, docs/v2/..., docs/v3/..., docs/v3/guides/integrations/hermes.mdx
Added troubleshooting page to docs index; major v3 contributing guide rewrite into provider/config reference; updated self-hosting guides to require LLM setup and reflect compose/DB changes.
New Troubleshooting Page
docs/v3/contributing/troubleshooting.mdx
New troubleshooting guide covering LLM/provider startup validation, deriver failure modes, thinking-budget errors, DB/migration checks, cache/Redis behavior, and Docker failure modes.
Minor Docs Adjustments
docs/v2/contributing/*, docs/v3/*
Various wording/example updates (UV installer, deriver worker start step, SDK snippets, condensed production guidance).

Sequence Diagram(s)

(Section skipped — changes do not introduce a new multi-component sequential control flow that requires a sequence diagram.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • VVoruganti
  • dr-frmr

Poem

🐇 I hopped through keys and swapped the rest,

One provider now to do the quest.
Ports whisper softly to localhost,
A tiny /health check keeps the burrow most.
Hop—configs bloom, the burrow’s best.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Self-hosting docs overhaul: single-provider default, restructured config guide' accurately reflects the main objectives: simplifying self-hosting to a single OpenAI-compatible provider and restructuring configuration documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch abigail/self-hosting-docs-overhaul

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs/v2/contributing/self-hosting.mdx (1)

54-67: ⚠️ Potential issue | 🟠 Major

Use the LLM_-prefixed variable names in both .env examples.

src/config.py loads LLM settings with env_prefix="LLM_", so OPENAI_API_KEY and ANTHROPIC_API_KEY here won't be read. A reader who copies either snippet will still boot without configured provider credentials. The same rename is needed in the duplicated Hermes setup snippet too.

Suggested fix
-OPENAI_API_KEY=your-openai-api-key
-ANTHROPIC_API_KEY=your-anthropic-api-key
+LLM_OPENAI_API_KEY=your-openai-api-key
+LLM_ANTHROPIC_API_KEY=your-anthropic-api-key

Also applies to: 168-174

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v2/contributing/self-hosting.mdx` around lines 54 - 67, The .env
examples use OPENAI_API_KEY and ANTHROPIC_API_KEY but src/config.py expects
LLM_-prefixed vars via env_prefix="LLM_"; update both `.env` snippets (the
initial example and the Hermes setup duplicate) to use LLM_OPENAI_API_KEY and
LLM_ANTHROPIC_API_KEY so the keys are actually loaded by the configuration
loader (referencing the env_prefix="LLM_" behavior in src/config.py).
docs/v3/contributing/configuration.mdx (1)

173-188: ⚠️ Potential issue | 🟡 Minor

Remove TOOL_CHOICE from the reference example unless the config model supports it.

The provided DialecticLevelSettings model only exposes provider/model/backup/thinking/max-tool-iterations/max-output-tokens. Including TOOL_CHOICE in a “complete reference” example makes the docs advertise a knob the current settings model does not read.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/configuration.mdx` around lines 173 - 188, Remove the
unsupported TOOL_CHOICE key from the example config.toml so it matches the
DialecticLevelSettings model; update the example blocks for
[dialectic.levels.minimal] and [dialectic.levels.low] to only include PROVIDER,
MODEL, THINKING_BUDGET_TOKENS, MAX_TOOL_ITERATIONS, and MAX_OUTPUT_TOKENS (and
any supported backup fields if present) to avoid advertising a setting the
settings model does not read.
docs/v2/contributing/configuration.mdx (1)

146-153: ⚠️ Potential issue | 🟡 Minor

Keep the local URI aligned with the compose example below.

This example now targets /postgres, but the compose snippet later in the same page still sets POSTGRES_DB: honcho on Line 181. Copying both blocks can leave users initializing extensions or migrations against a different database than the one Honcho connects to.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v2/contributing/configuration.mdx` around lines 146 - 153, The
DB_CONNECTION_URI example and the compose snippet POSTGRES_DB value are
inconsistent; update one so both reference the same database name. Either change
the example DB_CONNECTION_URI
(DB_CONNECTION_URI=postgresql+psycopg://postgres:postgres@localhost:5432/honcho)
to match POSTGRES_DB: honcho, or change the compose snippet's POSTGRES_DB to
postgres—ensure the symbols DB_CONNECTION_URI and POSTGRES_DB are aligned so
users connect to the same database.
🧹 Nitpick comments (2)
src/main.py (1)

199-202: Consider separating liveness from readiness.

This endpoint now backs the container health check, but it always returns 200 without touching Postgres or Redis. That means the container can stay “healthy” during dependency outages. If the goal is to gate traffic, add a dependency-aware /ready probe and keep /health as a cheap liveness check; include_in_schema=False would also keep this infra-only route out of the public OpenAPI.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main.py` around lines 199 - 202, The current health_check (function
health_check at route "/health") is only a cheap liveness probe and should
remain lightweight; add a new readiness endpoint (e.g., "/ready", function
ready_check) that performs dependency checks against Postgres and Redis (open a
short connection or run a lightweight query/ping against each) and returns
non-200 if any dependency is unhealthy; keep the liveness "/health" simple and
mark the readiness route (and optionally "/health") with include_in_schema=False
to avoid exposing infra-only endpoints in OpenAPI. Ensure ready_check returns a
clear failure status and message when either Postgres or Redis checks fail and
reuses existing DB/Redis clients or connection helpers in the module.
README.md (1)

219-229: Move the Groq key out of the “required configurations” block.

This section is introduced as required setup, but LLM_GROQ_API_KEY is explicitly marked optional. Splitting required vs. optional provider keys would make the bootstrap checklist clearer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 219 - 229, The README currently lists
LLM_GROQ_API_KEY in the "required configurations" block even though it's
optional; update the env example by splitting provider keys into two blocks: one
"Required LLM Provider API Keys" containing LLM_GEMINI_API_KEY,
LLM_ANTHROPIC_API_KEY, and LLM_OPENAI_API_KEY, and a separate "Optional LLM
Provider API Keys" block containing LLM_GROQ_API_KEY (keep the existing
comments/annotations like EMBED_MESSAGES guidance), so the required vs optional
intent is clear when referencing the variables LLM_GEMINI_API_KEY,
LLM_ANTHROPIC_API_KEY, LLM_OPENAI_API_KEY, and LLM_GROQ_API_KEY.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/v3/contributing/configuration.mdx`:
- Line 31: The doc examples use the wrong env-var separator for nested Dialectic
settings; update all examples that show overrides (including the snippet with
`{SECTION}__{NESTED}__{KEY}` and the other ranges noted) to use the top-level
section name plus a double-underscore before nested keys, e.g. use
`DIALECTIC__LEVELS__minimal__PROVIDER` (so it maps to
settings.DIALECTIC.LEVELS.minimal), and replace any `DIALECTIC_LEVELS__...`
occurrences with `DIALECTIC__LEVELS__...` so provider/model/thinking-budget
overrides actually populate settings.DIALECTIC.LEVELS.
- Around line 7-9: Update the callout text and link in the documentation so it
references the new single-provider flow: replace the phrase "Most users only
need the three API keys from the Self-Hosting Guide" with wording that points
readers to the "LLM Setup" section (e.g., "Most users only need the
single-provider setup described in the Self-Hosting Guide") and change the link
target from ./self-hosting#llm-api-keys to ./self-hosting#llm-setup (or simply
./self-hosting if anchors are not used), ensuring the callout no longer
references the outdated three-key flow or the dead anchor.

In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 108-109: Update the broken self-links that reference non-existent
anchors by replacing occurrences of "#llm-provider-setup" and "#llm-api-keys"
with the current anchor "#llm-setup" in the document; look for the text patterns
"LLM Provider Setup" and the inline links in the sentences that mention editing
`.env` and configuring your LLM provider (the lines around the current diff and
also the other occurrences noted at the document positions referred to in the
review) and update their hrefs so they point to "#llm-setup".
- Around line 51-74: The env var names for per-level dialectic settings are
missing the required double underscore between DIALECTIC and LEVELS, so
overrides like DIALECTIC_LEVELS__minimal__PROVIDER won't be picked up; update
every occurrence (e.g., DIALECTIC_LEVELS__minimal__PROVIDER,
DIALECTIC_LEVELS__low__MODEL, DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS,
etc.) to use DIALECTIC__LEVELS__... (e.g., DIALECTIC__LEVELS__minimal__PROVIDER)
and likewise ensure any THINKING_BUDGET_TOKENS variants follow the same
DIALECTIC__LEVELS__<level>__THINKING_BUDGET_TOKENS pattern so
settings.DIALECTIC.LEVELS reads the env correctly.
- Around line 79-80: The Info link in docs/v3/contributing/self-hosting.mdx
points to a removed anchor `#alternative-providers`; update the link target in
the Info block to a valid anchor or page—replace
`./configuration#alternative-providers` with either
`./configuration#provider-types`, `./configuration#direct-vendor-keys`, or
simply `./configuration` so the reference resolves correctly; ensure both
occurrences (the one at lines ~79 and ~398) are updated to the same valid
target.
- Around line 39-75: The docs sample only reconfigures generation models
(DERIVER_*, SUMMARY_*, DREAM_*, DIALECTIC_LEVELS__*), but omits the embedding
override so readers may still hit OpenAI embeddings; add instructions to either
set the embedding override envs (OPENAI_BASE_URL / OPENAI_EMBEDDING_MODEL — or
the LLM-prefixed equivalents LLM_OPENAI_BASE_URL / LLM_OPENAI_EMBEDDING_MODEL
used by LLMSettings) to point embeddings at the same OpenAI-compatible endpoint,
or show the explicit disable/retarget step for embeddings (i.e., set the
embeddings provider to your custom/none value); reference the existing
DERIVER_/SUMMARY_/DREAM_/DIALECTIC_LEVELS__* env pattern so maintainers place
the new embedding envs alongside them.

In `@docs/v3/contributing/troubleshooting.mdx`:
- Around line 152-160: The env var snippet uses the wrong nesting
(`DIALECTIC_LEVELS__...`) so it doesn't override settings.DIALECTIC.LEVELS;
update each variable to the nested form with the double-underscore after
DIALECTIC (e.g. use DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS,
DIALECTIC__LEVELS__low__THINKING_BUDGET_TOKENS, etc.), and when overriding
provider-level settings mention the per-level provider key format (e.g.
DIALECTIC__LEVELS__minimal__PROVIDER) so the per-level budgets/providers in
settings.DIALECTIC.LEVELS are actually cleared.
- Line 28: The link in docs/v3/contributing/troubleshooting.mdx points to a
non-existent anchor (/v3/contributing/self-hosting#which-api-keys-do-i-need);
open self-hosting.mdx to find the exact heading slug for the API keys section
(or decide to link to the page root), then update the href in
troubleshooting.mdx to the correct anchor or to /v3/contributing/self-hosting so
readers don't land on a dead link; ensure you update the link that currently
targets `which-api-keys-do-i-need` so it matches the actual heading ID in
self-hosting.mdx.

---

Outside diff comments:
In `@docs/v2/contributing/configuration.mdx`:
- Around line 146-153: The DB_CONNECTION_URI example and the compose snippet
POSTGRES_DB value are inconsistent; update one so both reference the same
database name. Either change the example DB_CONNECTION_URI
(DB_CONNECTION_URI=postgresql+psycopg://postgres:postgres@localhost:5432/honcho)
to match POSTGRES_DB: honcho, or change the compose snippet's POSTGRES_DB to
postgres—ensure the symbols DB_CONNECTION_URI and POSTGRES_DB are aligned so
users connect to the same database.

In `@docs/v2/contributing/self-hosting.mdx`:
- Around line 54-67: The .env examples use OPENAI_API_KEY and ANTHROPIC_API_KEY
but src/config.py expects LLM_-prefixed vars via env_prefix="LLM_"; update both
`.env` snippets (the initial example and the Hermes setup duplicate) to use
LLM_OPENAI_API_KEY and LLM_ANTHROPIC_API_KEY so the keys are actually loaded by
the configuration loader (referencing the env_prefix="LLM_" behavior in
src/config.py).

In `@docs/v3/contributing/configuration.mdx`:
- Around line 173-188: Remove the unsupported TOOL_CHOICE key from the example
config.toml so it matches the DialecticLevelSettings model; update the example
blocks for [dialectic.levels.minimal] and [dialectic.levels.low] to only include
PROVIDER, MODEL, THINKING_BUDGET_TOKENS, MAX_TOOL_ITERATIONS, and
MAX_OUTPUT_TOKENS (and any supported backup fields if present) to avoid
advertising a setting the settings model does not read.

---

Nitpick comments:
In `@README.md`:
- Around line 219-229: The README currently lists LLM_GROQ_API_KEY in the
"required configurations" block even though it's optional; update the env
example by splitting provider keys into two blocks: one "Required LLM Provider
API Keys" containing LLM_GEMINI_API_KEY, LLM_ANTHROPIC_API_KEY, and
LLM_OPENAI_API_KEY, and a separate "Optional LLM Provider API Keys" block
containing LLM_GROQ_API_KEY (keep the existing comments/annotations like
EMBED_MESSAGES guidance), so the required vs optional intent is clear when
referencing the variables LLM_GEMINI_API_KEY, LLM_ANTHROPIC_API_KEY,
LLM_OPENAI_API_KEY, and LLM_GROQ_API_KEY.

In `@src/main.py`:
- Around line 199-202: The current health_check (function health_check at route
"/health") is only a cheap liveness probe and should remain lightweight; add a
new readiness endpoint (e.g., "/ready", function ready_check) that performs
dependency checks against Postgres and Redis (open a short connection or run a
lightweight query/ping against each) and returns non-200 if any dependency is
unhealthy; keep the liveness "/health" simple and mark the readiness route (and
optionally "/health") with include_in_schema=False to avoid exposing infra-only
endpoints in OpenAPI. Ensure ready_check returns a clear failure status and
message when either Postgres or Redis checks fail and reuses existing DB/Redis
clients or connection helpers in the module.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0c9be474-c73a-4372-be94-519b8800502d

📥 Commits

Reviewing files that changed from the base of the PR and between fa8f0b1 and 0047292.

📒 Files selected for processing (14)
  • .env.template
  • CONTRIBUTING.md
  • Dockerfile
  • README.md
  • config.toml.example
  • docker-compose.yml.example
  • docs/docs.json
  • docs/v2/contributing/configuration.mdx
  • docs/v2/contributing/self-hosting.mdx
  • docs/v3/contributing/configuration.mdx
  • docs/v3/contributing/self-hosting.mdx
  • docs/v3/contributing/troubleshooting.mdx
  • docs/v3/guides/integrations/hermes.mdx
  • src/main.py

…cies

Fix 4 broken internal links (#llm-provider-setup, #llm-api-keys,
#which-api-keys-do-i-need, #alternative-providers) to point to
correct headings. Remove redundant Docker migration step (entrypoint
already runs alembic). Fix cache URL missing ?suppress=true in
reference config. Fix uv install command to use official method.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/v3/contributing/configuration.mdx (1)

209-215: ⚠️ Potential issue | 🟠 Major

Fix the per-level env var example.

This example demonstrating the env var format for nested levels uses the wrong separator.

🔧 Proposed fix
 Environment variables for nested levels use double underscores:
 ```bash
-DIALECTIC_LEVELS__minimal__PROVIDER=google
-DIALECTIC_LEVELS__minimal__MODEL=gemini-2.5-flash-lite
-DIALECTIC_LEVELS__minimal__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__minimal__MAX_TOOL_ITERATIONS=1
+DIALECTIC__LEVELS__minimal__PROVIDER=google
+DIALECTIC__LEVELS__minimal__MODEL=gemini-2.5-flash-lite
+DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__minimal__MAX_TOOL_ITERATIONS=1
</details>

Based on learnings: Dialectic now uses per-level providers via `settings.DIALECTIC.LEVELS`; overrides must use nested env variables like `DIALECTIC__LEVELS__minimal__PROVIDER`.

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/v3/contributing/configuration.mdx around lines 209 - 215, Update the
per-level environment variable examples to use the correct double-underscore
nesting for settings.DIALECTIC.LEVELS by replacing the incorrect prefix
"DIALECTIC_LEVELS__" with "DIALECTIC__LEVELS__" in the examples (i.e., change
entries referencing DIALECTIC_LEVELS__minimal__... to
DIALECTIC__LEVELS__minimal__... so they match the nested settings key used by
the code).


</details>

</blockquote></details>

</blockquote></details>
♻️ Duplicate comments (5)
docs/v3/contributing/configuration.mdx (3)

134-137: ⚠️ Potential issue | 🟠 Major

Fix thinking budget env var names.

These dialectic thinking budget overrides use the wrong separator format.

🔧 Proposed fix
-DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS=1024
-DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS=1024
-DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS=2048
+DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS=1024
+DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS=1024
+DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS=2048

Based on learnings: Dialectic now uses per-level providers via settings.DIALECTIC.LEVELS; overrides must use nested env variables like DIALECTIC__LEVELS__minimal__PROVIDER.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/configuration.mdx` around lines 134 - 137, The
environment variable names for per-level thinking budgets use wrong separators;
update the variables like DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS,
DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS, and
DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS to the nested env format used by
settings.DIALECTIC.LEVELS (e.g.,
DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS,
DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS,
DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS) so the config loader maps them
into DIALECTIC.LEVELS properly.

77-88: ⚠️ Potential issue | 🟠 Major

Use DIALECTIC__LEVELS__... for per-level overrides.

All dialectic level env vars in this tiered setup example use the wrong separator format.

🔧 Proposed fix
 # Light tier — high throughput, cheap
-DIALECTIC_LEVELS__minimal__PROVIDER=custom
-DIALECTIC_LEVELS__minimal__MODEL=google/gemini-2.5-flash-lite
-DIALECTIC_LEVELS__low__PROVIDER=custom
-DIALECTIC_LEVELS__low__MODEL=google/gemini-2.5-flash-lite
+DIALECTIC__LEVELS__minimal__PROVIDER=custom
+DIALECTIC__LEVELS__minimal__MODEL=google/gemini-2.5-flash-lite
+DIALECTIC__LEVELS__low__PROVIDER=custom
+DIALECTIC__LEVELS__low__MODEL=google/gemini-2.5-flash-lite

 # Medium tier — better reasoning
-DIALECTIC_LEVELS__medium__PROVIDER=custom
-DIALECTIC_LEVELS__medium__MODEL=anthropic/claude-haiku-4-5
-DIALECTIC_LEVELS__high__PROVIDER=custom
-DIALECTIC_LEVELS__high__MODEL=anthropic/claude-haiku-4-5
-DIALECTIC_LEVELS__max__PROVIDER=custom
-DIALECTIC_LEVELS__max__MODEL=anthropic/claude-haiku-4-5
+DIALECTIC__LEVELS__medium__PROVIDER=custom
+DIALECTIC__LEVELS__medium__MODEL=anthropic/claude-haiku-4-5
+DIALECTIC__LEVELS__high__PROVIDER=custom
+DIALECTIC__LEVELS__high__MODEL=anthropic/claude-haiku-4-5
+DIALECTIC__LEVELS__max__PROVIDER=custom
+DIALECTIC__LEVELS__max__MODEL=anthropic/claude-haiku-4-5

Based on learnings: Dialectic now uses per-level providers via settings.DIALECTIC.LEVELS; overrides must use nested env variables like DIALECTIC__LEVELS__minimal__PROVIDER.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/configuration.mdx` around lines 77 - 88, Replace the env
var keys that use a single underscore between DIALECTIC and LEVELS (e.g., any
occurrences like DIALECTIC_LEVELS__minimal__PROVIDER,
DIALECTIC_LEVELS__low__MODEL, etc.) with the nested env-var format
DIALECTIC__LEVELS__... (e.g., DIALECTIC__LEVELS__minimal__PROVIDER,
DIALECTIC__LEVELS__low__MODEL) so they map into settings.DIALECTIC.LEVELS;
update every similar entry in this snippet (minimal/low/medium/high/max PROVIDER
and MODEL lines) to use the double-underscore separator between DIALECTIC and
LEVELS.

29-32: ⚠️ Potential issue | 🟠 Major

Fix the env var naming example for nested settings.

The example shows DIALECTIC_LEVELS__minimal__PROVIDER but the correct format is DIALECTIC__LEVELS__minimal__PROVIDER (double underscore after DIALECTIC).

🔧 Proposed fix
 - `{SECTION}_{KEY}` for section settings (e.g., `DB_CONNECTION_URI` → `[db].CONNECTION_URI`)
 - `{KEY}` for app-level settings (e.g., `LOG_LEVEL` → `[app].LOG_LEVEL`)
-- `{SECTION}__{NESTED}__{KEY}` for deeply nested settings (double underscore, e.g., `DIALECTIC_LEVELS__minimal__PROVIDER`)
+- `{SECTION}__{NESTED}__{KEY}` for deeply nested settings (double underscore, e.g., `DIALECTIC__LEVELS__minimal__PROVIDER`)

Based on learnings: Dialectic now uses per-level providers via settings.DIALECTIC.LEVELS; overrides must use nested env variables like DIALECTIC__LEVELS__minimal__PROVIDER.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/configuration.mdx` around lines 29 - 32, The env-var
example for nested settings is wrong: update the doc where it shows
DIALECTIC_LEVELS__minimal__PROVIDER to use the correct nested env var format
DIALECTIC__LEVELS__minimal__PROVIDER (double underscore after DIALECTIC) and
mention that this maps to settings.DIALECTIC.LEVELS so per-level providers
(e.g., minimal.PROVIDER) can be overridden via
DIALECTIC__LEVELS__minimal__PROVIDER.
docs/v3/contributing/troubleshooting.mdx (1)

152-161: ⚠️ Potential issue | 🟠 Major

Use DIALECTIC__LEVELS__... for nested overrides.

The dialectic per-level env vars are missing the separator between the top-level DIALECTIC section and the nested LEVELS section. DIALECTIC_LEVELS__... will not populate settings.DIALECTIC.LEVELS, so these thinking-budget overrides will not take effect.

🔧 Proposed fix
 ```bash
 DERIVER_THINKING_BUDGET_TOKENS=0
 SUMMARY_THINKING_BUDGET_TOKENS=0
 DREAM_THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__minimal__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__low__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__low__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS=0
</details>

Based on learnings: Dialectic now uses per-level providers via `settings.DIALECTIC.LEVELS`; overrides must use nested env variables like `DIALECTIC__LEVELS__minimal__PROVIDER`.

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/v3/contributing/troubleshooting.mdx around lines 152 - 161, The env var
examples for per-level dialectic overrides are missing the nested separator;
replace any occurrences of DIALECTIC_LEVELS__... with DIALECTIC__LEVELS__... so
they populate settings.DIALECTIC.LEVELS (e.g., use
DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0 and for providers use
DIALECTIC__LEVELS__minimal__PROVIDER); update the example lines in the docs (the
block containing DERIVER_THINKING_BUDGET_TOKENS, SUMMARY_THINKING_BUDGET_TOKENS,
etc.) to use the double-underscore DIALECTIC__LEVELS__ prefix for all per-level
overrides.


</details>

</blockquote></details>
<details>
<summary>docs/v3/contributing/self-hosting.mdx (1)</summary><blockquote>

`51-74`: _⚠️ Potential issue_ | _🟠 Major_

**Use `DIALECTIC__LEVELS__...` for per-level overrides.**

All dialectic level env vars in this setup example use the wrong separator format. Users copying this will not have their dialectic settings applied.


<details>
<summary>🔧 Proposed fix</summary>

```diff
 # One model for everything
 DERIVER_PROVIDER=custom
 DERIVER_MODEL=google/gemini-2.5-flash
 SUMMARY_PROVIDER=custom
 SUMMARY_MODEL=google/gemini-2.5-flash
-DIALECTIC_LEVELS__minimal__PROVIDER=custom
-DIALECTIC_LEVELS__minimal__MODEL=google/gemini-2.5-flash
-DIALECTIC_LEVELS__low__PROVIDER=custom
-DIALECTIC_LEVELS__low__MODEL=google/gemini-2.5-flash
-DIALECTIC_LEVELS__medium__PROVIDER=custom
-DIALECTIC_LEVELS__medium__MODEL=google/gemini-2.5-flash
-DIALECTIC_LEVELS__high__PROVIDER=custom
-DIALECTIC_LEVELS__high__MODEL=google/gemini-2.5-flash
-DIALECTIC_LEVELS__max__PROVIDER=custom
-DIALECTIC_LEVELS__max__MODEL=google/gemini-2.5-flash
+DIALECTIC__LEVELS__minimal__PROVIDER=custom
+DIALECTIC__LEVELS__minimal__MODEL=google/gemini-2.5-flash
+DIALECTIC__LEVELS__low__PROVIDER=custom
+DIALECTIC__LEVELS__low__MODEL=google/gemini-2.5-flash
+DIALECTIC__LEVELS__medium__PROVIDER=custom
+DIALECTIC__LEVELS__medium__MODEL=google/gemini-2.5-flash
+DIALECTIC__LEVELS__high__PROVIDER=custom
+DIALECTIC__LEVELS__high__MODEL=google/gemini-2.5-flash
+DIALECTIC__LEVELS__max__PROVIDER=custom
+DIALECTIC__LEVELS__max__MODEL=google/gemini-2.5-flash
 DREAM_PROVIDER=custom
 DREAM_MODEL=google/gemini-2.5-flash
 DREAM_DEDUCTION_MODEL=google/gemini-2.5-flash
 DREAM_INDUCTION_MODEL=google/gemini-2.5-flash

 # Disable thinking budget (only needed for Anthropic models)
 DERIVER_THINKING_BUDGET_TOKENS=0
 SUMMARY_THINKING_BUDGET_TOKENS=0
 DREAM_THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__minimal__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__low__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS=0
-DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__low__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS=0

Based on learnings: Dialectic now uses per-level providers via settings.DIALECTIC.LEVELS; overrides must use nested env variables like DIALECTIC__LEVELS__minimal__PROVIDER.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/self-hosting.mdx` around lines 51 - 74, The env var keys
in the example use the wrong separator (e.g.
DIALECTIC_LEVELS__minimal__PROVIDER) so per-level overrides won't be applied;
change every DIALECTIC_LEVELS__... occurrence to the nested form
DIALECTIC__LEVELS__... (double underscore before and after LEVELS) so they map
to settings.DIALECTIC.LEVELS (e.g., update DIALECTIC_LEVELS__minimal__MODEL →
DIALECTIC__LEVELS__minimal__MODEL and similarly for THINKING_BUDGET_TOKENS and
other DIALECTIC_* entries).
🧹 Nitpick comments (1)
docs/v3/contributing/self-hosting.mdx (1)

39-75: Consider documenting the embedding configuration.

This "one key / one model" setup rewires generation models but doesn't address embeddings. With EMBED_MESSAGES=true (the default), users following this guide may still encounter OpenAI embedding errors unless they either:

  1. Set EMBED_MESSAGES=false to disable embeddings entirely, or
  2. Configure embedding-specific overrides (LLM_OPENAI_BASE_URL, LLM_OPENAI_EMBEDDING_MODEL)

Adding a note or example for embedding configuration would make the single-provider story complete.

Based on learnings: OPENAI_BASE_URL is the key override for using OpenAI-compatible embedding providers such as Ollama.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/self-hosting.mdx` around lines 39 - 75, Add a short note
explaining that embeddings are separate from generation: either set
EMBED_MESSAGES=false to disable embeddings or configure embedding-specific
overrides (LLM_OPENAI_BASE_URL and LLM_OPENAI_EMBEDDING_MODEL) so embedding
calls target the OpenAI-compatible endpoint; also mention that if you're using
the compatibility vars shown (LLM_OPENAI_COMPATIBLE_BASE_URL) you must also
point embedding requests to that endpoint (e.g., via LLM_OPENAI_BASE_URL) when
EMBED_MESSAGES=true.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs/v3/contributing/configuration.mdx`:
- Around line 209-215: Update the per-level environment variable examples to use
the correct double-underscore nesting for settings.DIALECTIC.LEVELS by replacing
the incorrect prefix "DIALECTIC_LEVELS__" with "DIALECTIC__LEVELS__" in the
examples (i.e., change entries referencing DIALECTIC_LEVELS__minimal__... to
DIALECTIC__LEVELS__minimal__... so they match the nested settings key used by
the code).

---

Duplicate comments:
In `@docs/v3/contributing/configuration.mdx`:
- Around line 134-137: The environment variable names for per-level thinking
budgets use wrong separators; update the variables like
DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS,
DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS, and
DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS to the nested env format used by
settings.DIALECTIC.LEVELS (e.g.,
DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS,
DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS,
DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS) so the config loader maps them
into DIALECTIC.LEVELS properly.
- Around line 77-88: Replace the env var keys that use a single underscore
between DIALECTIC and LEVELS (e.g., any occurrences like
DIALECTIC_LEVELS__minimal__PROVIDER, DIALECTIC_LEVELS__low__MODEL, etc.) with
the nested env-var format DIALECTIC__LEVELS__... (e.g.,
DIALECTIC__LEVELS__minimal__PROVIDER, DIALECTIC__LEVELS__low__MODEL) so they map
into settings.DIALECTIC.LEVELS; update every similar entry in this snippet
(minimal/low/medium/high/max PROVIDER and MODEL lines) to use the
double-underscore separator between DIALECTIC and LEVELS.
- Around line 29-32: The env-var example for nested settings is wrong: update
the doc where it shows DIALECTIC_LEVELS__minimal__PROVIDER to use the correct
nested env var format DIALECTIC__LEVELS__minimal__PROVIDER (double underscore
after DIALECTIC) and mention that this maps to settings.DIALECTIC.LEVELS so
per-level providers (e.g., minimal.PROVIDER) can be overridden via
DIALECTIC__LEVELS__minimal__PROVIDER.

In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 51-74: The env var keys in the example use the wrong separator
(e.g. DIALECTIC_LEVELS__minimal__PROVIDER) so per-level overrides won't be
applied; change every DIALECTIC_LEVELS__... occurrence to the nested form
DIALECTIC__LEVELS__... (double underscore before and after LEVELS) so they map
to settings.DIALECTIC.LEVELS (e.g., update DIALECTIC_LEVELS__minimal__MODEL →
DIALECTIC__LEVELS__minimal__MODEL and similarly for THINKING_BUDGET_TOKENS and
other DIALECTIC_* entries).

In `@docs/v3/contributing/troubleshooting.mdx`:
- Around line 152-161: The env var examples for per-level dialectic overrides
are missing the nested separator; replace any occurrences of
DIALECTIC_LEVELS__... with DIALECTIC__LEVELS__... so they populate
settings.DIALECTIC.LEVELS (e.g., use
DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0 and for providers use
DIALECTIC__LEVELS__minimal__PROVIDER); update the example lines in the docs (the
block containing DERIVER_THINKING_BUDGET_TOKENS, SUMMARY_THINKING_BUDGET_TOKENS,
etc.) to use the double-underscore DIALECTIC__LEVELS__ prefix for all per-level
overrides.

---

Nitpick comments:
In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 39-75: Add a short note explaining that embeddings are separate
from generation: either set EMBED_MESSAGES=false to disable embeddings or
configure embedding-specific overrides (LLM_OPENAI_BASE_URL and
LLM_OPENAI_EMBEDDING_MODEL) so embedding calls target the OpenAI-compatible
endpoint; also mention that if you're using the compatibility vars shown
(LLM_OPENAI_COMPATIBLE_BASE_URL) you must also point embedding requests to that
endpoint (e.g., via LLM_OPENAI_BASE_URL) when EMBED_MESSAGES=true.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd729ff0-5841-4211-8d49-1fc76fd0cc8d

📥 Commits

Reviewing files that changed from the base of the PR and between 0047292 and fbf6ad6.

📒 Files selected for processing (3)
  • docs/v3/contributing/configuration.mdx
  • docs/v3/contributing/self-hosting.mdx
  • docs/v3/contributing/troubleshooting.mdx

.env.template now has provider/model lines uncommented with
placeholder values — user just sets endpoint, key, and model name.
Thinking budgets default to 0 for non-Anthropic providers.

Self-hosting page: removed 30-line env var wall, LLM setup now
points to the template. Merged duplicate verify sections.
Removed api_key from SDK examples (auth off by default).
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/v3/contributing/self-hosting.mdx (1)

35-47: ⚠️ Potential issue | 🟠 Major

LLM Setup section should mention embedding configuration.

The "one API key and one model" guidance covers generation models but doesn't address embeddings. Since LLM_EMBEDDING_PROVIDER defaults to openai, users following this single-provider setup may encounter embedding failures unless they also configure an OpenAI API key or switch the embedding provider.

Consider adding a note like: "Embeddings default to OpenAI. If using a different provider, set LLM_EMBEDDING_PROVIDER=openrouter in your .env."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/self-hosting.mdx` around lines 35 - 47, Add a short note
to the "LLM Setup" section (near the .env.template guidance) explaining that
embeddings default to OpenAI and must be configured separately: reference the
environment variable LLM_EMBEDDING_PROVIDER and instruct users to set it (e.g.,
LLM_EMBEDDING_PROVIDER=openrouter) or provide an OpenAI API key in the
.env.template when using a single-provider setup so embeddings don't fail;
update the text around `.env.template` and the LLM model/provider guidance to
mention this embedding-specific configuration.
🧹 Nitpick comments (1)
docs/v3/contributing/self-hosting.mdx (1)

235-238: Inconsistent SDK initialization examples.

The test script example includes workspace_id="my-app-testing" but the "Connect Your Application" section omits it. Either both should include it for consistency, or clarify when workspace_id is required vs optional.

Option: Add workspace_id to both examples
 client = Honcho(
     base_url="http://localhost:8000",
+    workspace_id="my-app",
 )

Also applies to: 255-257

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/self-hosting.mdx` around lines 235 - 238, The SDK
initialization examples are inconsistent: add workspace_id to the "Connect Your
Application" example (and any other examples in this doc around the Connect
section and the test script block) or explicitly state when workspace_id is
optional; specifically update the Honcho initialization examples to use the same
form (e.g., Honcho(base_url="http://localhost:8000",
workspace_id="my-app-testing")) so the base_url and workspace_id usage is
consistent across the test script and Connect Your Application sections, or add
a short note next to the Honcho constructor explaining that workspace_id is
optional and when it should be provided.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.env.template:
- Line 88: The .env.template comment should clarify embedding-provider behavior
and guidance: update the commented line for LLM_EMBEDDING_PROVIDER to be
uncommented or add explanatory text indicating that embeddings default to openai
unless LLM_OPENAI_API_KEY is set or LLM_EMBEDDING_PROVIDER is changed to
openrouter (and the custom endpoint supports embeddings); also document that
OPENAI_BASE_URL can override the OpenAI-compatible endpoint and
OPENAI_EMBEDDING_MODEL can specify a custom embedding model name so
single-provider users know how to route embedding requests correctly.
- Around line 127-146: The env vars for per-level settings are incorrectly named
(DIALECTIC_LEVELS__...) and should use a double underscore to represent the
nested DIALECTIC -> LEVELS structure so Pydantic can load
settings.DIALECTIC.LEVELS; update all occurrences like
DIALECTIC_LEVELS__minimal__PROVIDER, DIALECTIC_LEVELS__low__MODEL, etc., to
DIALECTIC__LEVELS__minimal__PROVIDER, DIALECTIC__LEVELS__low__MODEL, etc.,
ensuring every level key (minimal, low, medium, high, max) and their subkeys
(PROVIDER, MODEL, THINKING_BUDGET_TOKENS, MAX_TOOL_ITERATIONS,
MAX_OUTPUT_TOKENS) use DIALECTIC__LEVELS__<level>__<KEY> naming.

---

Duplicate comments:
In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 35-47: Add a short note to the "LLM Setup" section (near the
.env.template guidance) explaining that embeddings default to OpenAI and must be
configured separately: reference the environment variable LLM_EMBEDDING_PROVIDER
and instruct users to set it (e.g., LLM_EMBEDDING_PROVIDER=openrouter) or
provide an OpenAI API key in the .env.template when using a single-provider
setup so embeddings don't fail; update the text around `.env.template` and the
LLM model/provider guidance to mention this embedding-specific configuration.

---

Nitpick comments:
In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 235-238: The SDK initialization examples are inconsistent: add
workspace_id to the "Connect Your Application" example (and any other examples
in this doc around the Connect section and the test script block) or explicitly
state when workspace_id is optional; specifically update the Honcho
initialization examples to use the same form (e.g.,
Honcho(base_url="http://localhost:8000", workspace_id="my-app-testing")) so the
base_url and workspace_id usage is consistent across the test script and Connect
Your Application sections, or add a short note next to the Honcho constructor
explaining that workspace_id is optional and when it should be provided.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8774bac-bb5a-4bd4-8dfa-6479c26ffd98

📥 Commits

Reviewing files that changed from the base of the PR and between fbf6ad6 and af0fbb7.

📒 Files selected for processing (2)
  • .env.template
  • docs/v3/contributing/self-hosting.mdx

erosika added 2 commits April 7, 2026 13:30
Without this, embeddings default to openai which requires a separate
LLM_OPENAI_API_KEY. Setting to openrouter routes embeddings through
the same OpenAI-compatible endpoint as everything else.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/v3/contributing/self-hosting.mdx (1)

37-42: ⚠️ Potential issue | 🟠 Major

The simplified setup still leaves embeddings undocumented.

This path only explains generation-provider setup, so readers can still leave embeddings on the default OpenAI route and end up needing a second provider even though the copy says “one API key and one model.” Please call out the matching embedding override, or an explicit disable/retarget step, next to this guidance. Based on learnings: OPENAI_BASE_URL is the key override for OpenAI-compatible embedding providers, and OPENAI_EMBEDDING_MODEL lets users replace the default embedding model.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/v3/contributing/self-hosting.mdx` around lines 37 - 42, The docs claim
"one API key and one model" but don't mention embedding configuration; update
the paragraph that starts "You need one API key and one model" to also instruct
readers how to override or disable the default OpenAI embeddings by setting the
environment variables OPENAI_BASE_URL (to point embeddings to an
OpenAI-compatible provider) and OPENAI_EMBEDDING_MODEL (to choose a non-default
embedding model), and add a brief note about explicitly disabling or retargeting
embeddings if using a different provider so users won't inadvertently require a
second provider.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 293-297: Update the wording that claims the default compose is
"production-ready": change it to "production-oriented defaults" or explicitly
state that public deployments are not ready until authentication is enabled;
reference the AUTH_USE_AUTH flag and the python scripts/generate_jwt_secret.py
step in the adjacent section so readers know to set AUTH_USE_AUTH=true and
generate a JWT secret before public deployment.
- Around line 341-343: Clarify that the deriver service exposes Prometheus
metrics on port 9090 inside its container (accessible via Docker DNS as
deriver:9090), whereas the development Compose exposes/prometheus binds host
port 9090 (e.g., 127.0.0.1:9090:9090) for the Prometheus UI; update the lines
referencing "deriver exposes Prometheus metrics on port 9090" and "dev compose
includes Prometheus on port 9090" to explicitly state "container/internal port"
vs "host/mapped port" and give the example Docker DNS and host mapping to
prevent confusion.

---

Duplicate comments:
In `@docs/v3/contributing/self-hosting.mdx`:
- Around line 37-42: The docs claim "one API key and one model" but don't
mention embedding configuration; update the paragraph that starts "You need one
API key and one model" to also instruct readers how to override or disable the
default OpenAI embeddings by setting the environment variables OPENAI_BASE_URL
(to point embeddings to an OpenAI-compatible provider) and
OPENAI_EMBEDDING_MODEL (to choose a non-default embedding model), and add a
brief note about explicitly disabling or retargeting embeddings if using a
different provider so users won't inadvertently require a second provider.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ab290026-0bba-4746-ac39-a280bca3e896

📥 Commits

Reviewing files that changed from the base of the PR and between af0fbb7 and f47eea3.

📒 Files selected for processing (1)
  • docs/v3/contributing/self-hosting.mdx

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.env.template (1)

129-148: ⚠️ Potential issue | 🔴 Critical

Use double underscore between DIALECTIC and LEVELS for nested Pydantic settings.

The env var names use DIALECTIC_LEVELS__* but Pydantic nested settings with env_prefix="DIALECTIC_" and env_nested_delimiter="__" require DIALECTIC__LEVELS__* (double underscore) to access the nested LEVELS dict. With the current naming, these overrides will not be applied and users will get default values instead.

🔧 Proposed fix
-DIALECTIC_LEVELS__minimal__PROVIDER=custom
-DIALECTIC_LEVELS__minimal__MODEL=your-model-here
-DIALECTIC_LEVELS__minimal__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__minimal__PROVIDER=custom
+DIALECTIC__LEVELS__minimal__MODEL=your-model-here
+DIALECTIC__LEVELS__minimal__THINKING_BUDGET_TOKENS=0
 # DIALECTIC_LEVELS__minimal__MAX_TOOL_ITERATIONS=1
-# DIALECTIC_LEVELS__minimal__MAX_OUTPUT_TOKENS=250
-DIALECTIC_LEVELS__low__PROVIDER=custom
-DIALECTIC_LEVELS__low__MODEL=your-model-here
-DIALECTIC_LEVELS__low__THINKING_BUDGET_TOKENS=0
+# DIALECTIC__LEVELS__minimal__MAX_OUTPUT_TOKENS=250
+DIALECTIC__LEVELS__low__PROVIDER=custom
+DIALECTIC__LEVELS__low__MODEL=your-model-here
+DIALECTIC__LEVELS__low__THINKING_BUDGET_TOKENS=0
 # DIALECTIC_LEVELS__low__MAX_TOOL_ITERATIONS=5
-DIALECTIC_LEVELS__medium__PROVIDER=custom
-DIALECTIC_LEVELS__medium__MODEL=your-model-here
-DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__medium__PROVIDER=custom
+DIALECTIC__LEVELS__medium__MODEL=your-model-here
+DIALECTIC__LEVELS__medium__THINKING_BUDGET_TOKENS=0
 # DIALECTIC_LEVELS__medium__MAX_TOOL_ITERATIONS=2
-DIALECTIC_LEVELS__high__PROVIDER=custom
-DIALECTIC_LEVELS__high__MODEL=your-model-here
-DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__high__PROVIDER=custom
+DIALECTIC__LEVELS__high__MODEL=your-model-here
+DIALECTIC__LEVELS__high__THINKING_BUDGET_TOKENS=0
 # DIALECTIC_LEVELS__high__MAX_TOOL_ITERATIONS=4
-DIALECTIC_LEVELS__max__PROVIDER=custom
-DIALECTIC_LEVELS__max__MODEL=your-model-here
-DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS=0
+DIALECTIC__LEVELS__max__PROVIDER=custom
+DIALECTIC__LEVELS__max__MODEL=your-model-here
+DIALECTIC__LEVELS__max__THINKING_BUDGET_TOKENS=0
 # DIALECTIC_LEVELS__max__MAX_TOOL_ITERATIONS=10

Note: Also update the commented lines 132-133, 137, 141, 145, 149 to use DIALECTIC__LEVELS__ prefix.

Based on learnings: Dialectic now uses per-level providers via settings.DIALECTIC.LEVELS; in CI, overrides must use nested env variables like DIALECTIC__LEVELS__minimal__PROVIDER.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.template around lines 129 - 148, Env vars use a single underscore
between DIALECTIC and LEVELS so Pydantic nested settings
(env_prefix="DIALECTIC_", env_nested_delimiter="__") won't pick them up; change
every occurrence of DIALECTIC_LEVELS__* to DIALECTIC__LEVELS__* (including the
commented lines like the MAX_TOOL_ITERATIONS/MAX_OUTPUT_TOKENS entries) so the
per-level settings (settings.DIALECTIC.LEVELS, e.g., minimal, low, medium, high,
max) are correctly loaded from the environment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.env.template:
- Around line 129-148: Env vars use a single underscore between DIALECTIC and
LEVELS so Pydantic nested settings (env_prefix="DIALECTIC_",
env_nested_delimiter="__") won't pick them up; change every occurrence of
DIALECTIC_LEVELS__* to DIALECTIC__LEVELS__* (including the commented lines like
the MAX_TOOL_ITERATIONS/MAX_OUTPUT_TOKENS entries) so the per-level settings
(settings.DIALECTIC.LEVELS, e.g., minimal, low, medium, high, max) are correctly
loaded from the environment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31efe46f-a563-4f65-9e17-e5babbdd2e34

📥 Commits

Reviewing files that changed from the base of the PR and between f47eea3 and f37af64.

📒 Files selected for processing (1)
  • .env.template

erosika added 6 commits April 7, 2026 14:21
Hermes integration page: replaced inline Docker/manual setup with
link to self-hosting guide, added elkimek community link. Removed
old env var names (OPENAI_API_KEY without LLM_ prefix).

Troubleshooting: removed "or 1" from thinking budget guidance.
Self-hosting: softened "production-ready" to "production-oriented"
since auth is disabled by default.
.env.template: added "e.g. google/gemini-2.5-flash" hints next to
model placeholders so users know the expected format.

Self-hosting: expanded LLM Setup to show the 3 things users need to
set (endpoint, key, model name) with find-replace tip. Added build
time note, deriver log check, and real smoke test (create workspace)
to verify section. Health check now notes it doesn't verify DB/LLM.
Updated config to match hermes-agent docs: removed apiKey (not needed
for self-hosted), added hermes memory setup CLI command, added config
fields table (recallMode, writeFrequency, sessionStrategy, etc.).

Better verification tests: store-and-recall across sessions, direct
tool calling test. Links to upstream hermes docs for full field list.
Comment out THINKING_BUDGET_TOKENS=0 in .env.template — deriver,
summary, and dream validators require gt=0. Dialectic levels also
commented out since non-thinking models don't need the override.

Add COPY for docker/ directory in Dockerfile so entrypoint.sh is
available when docker-compose.yml.example references it.
Comment on lines +108 to +111
4. **Processing backlog** — With `DERIVER_WORKERS=1` (default), high message volume can cause a backlog. Increase workers:
```bash
DERIVER_WORKERS=4
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing to add here is if the representation batch max is too high then the session may not have reached a threshold tu run

@VVoruganti VVoruganti merged commit ff116b0 into main Apr 8, 2026
10 checks passed
@VVoruganti VVoruganti deleted the abigail/self-hosting-docs-overhaul branch April 8, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants