Skip to content

docs: fix drift between docs and source (docs review pass 1 + 2) - #794

Merged
kovtcharov merged 13 commits into
mainfrom
docs/review-fixes-apr17
Apr 17, 2026
Merged

kovtcharov merged 13 commits into
mainfrom
docs/review-fixes-apr17

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Sweep of docs-vs-source drift across the GAIA docs tree. Developers following SDK examples were hitting TypeErrors from non-existent methods (rag.index_documents, AudioClient.synthesize, ChatAgent(kwargs), registry.register, agent.execute_tool) and mis-documented CLI flags. Two spec files (plugin-registry, database-mixin) described entire APIs that don't exist in code. This PR realigns the docs with what actually ships in v0.17.2.

Threads

  • Broken SDK examples fixed — sdks/{rag,audio,chat,agent-ui}.mdx, agents/specialized.mdx, guides/{chat,sd}.mdx, examples.mdx, applications.mdx, testing.mdx, packaging.mdx, playbooks. Every affected example now compiles against current source.

  • Specs rewritten against source — plugin-registry.mdx, database-mixin.mdx, summarizer-app.mdx, api-server.mdx AgentRegistry, agent-base.mdx. These were documenting APIs that don't exist (SQLAlchemy vs stdlib sqlite3, invented register_agent(), fictional SummarizerApp methods, public execute_tool). Maintainer should spot-check against source.

  • CLI reference completeness — added missing gaia cache section, ~12 undocumented flags across chat/api/download/mcp, port-8080 collision warning between gaia api start and gaia mcp docker. Fixes user-reported confusion.

  • reference/dev.mdx — Agent UI install path unblocked — full 12-extra table added ([ui] was blocking the Agent UI install), dropped stale --extra-index-url workaround, added Linting + Running Tests sections.

  • sdks/agent-ui.mdx endpoint coverage ~doubled — 20+ missing REST endpoints added across all 8 routers. Consumers building against the Agent UI backend can now discover the full surface.

  • Deleted 2 already-shipped plan docs — plans/installer.mdx (install/uninstall/MSI all shipped in v0.17.x) and plans/mcp-client.mdx (mixin shipped in v0.15.4). Nine cross-references retargeted.

  • Misc drift — C++ docs (GAIA_ENABLE_SSL flag doesn't exist, 8→12 unit test modules, streaming ships), release notes (v0.15.4 typo, v0.16.1 compare link → HEAD), integrations (VSCode gaia.apiUrl setting never existed, MCP tests/endpoints), source docstrings (AgentSDK/SimpleChat/AgentSession shown with await on sync methods), Vite port 5173→5174 in CLAUDE.md + plans, Node 18→20 in quickstart.

Intentionally skipped: eval-framework docs — separate open PR is overhauling that area.

Test plan

  • python util/check_doc_links.py --internal-only — 751/751 pass
  • docs.json valid JSON; all referenced pages exist
  • JSX tag balance check across all 60 edited .mdx files (Accordion/Tabs/etc.)
  • Spot-check of merge against origin/main clean
  • Maintainer sanity-check of the 5 rewritten specs against current source

A two-pass review found ~80 docs issues spanning broken copy-paste examples,
missing CLI flags, wrong method names, and fabricated specs. This commit
applies the critical and high-impact fixes.

SDK docs
- rag.mdx: replace non-existent rag.index_documents / clear_index / SecurityError
  with index_document (loops), clear_cache, PermissionError; fix get_stats() →
  get_status() with correct key names (indexed_files).
- audio.mdx: rewrite around real API — remove nonexistent AudioClient.get_device_list,
  fix tts.list_voices → list_available_voices, tts.synthesize(text, voice) →
  set_voice + generate_speech returning (samples, phonemes, stats), add await
  for start_voice_chat.
- agents/specialized.mdx: fix ChatAgent(documents_path=…) TypeError →
  ChatAgent(ChatAgentConfig(rag_documents=…)).
- mixins/tool-mixins.mdx: rewrite tool lists per mixin to match actual
  registered tools (FileToolsMixin only adds add_watch_directory; RAGToolsMixin
  registers 10 tools; ShellToolsMixin exposes run_shell_command not
  execute_shell_command; FileSearchToolsMixin lists all 9 tools).
- core/tools.mdx: replace fictional JSON-schema generator with actual
  tools.py:40-77 implementation (no per-arg docstring parsing, no defaults).
- core/agent-system.mdx: fix LLMClient() TypeError (abstract) → create_client().
- infrastructure/api-server.mdx: remove nonexistent registry.register(); document
  the real AGENT_MODELS static dict; fix ApiAgent MRO; align SSE event types
  with ui/sse_handler.py. Add port-8080 collision note with gaia mcp docker.

Guides
- chat.mdx: fix ChatAgent(rag_documents=…, chunk_size=…) TypeError by wrapping
  in ChatAgentConfig.
- sd.mdx: remove invented create_story_from_last_image tool; document the real
  create_story_from_image(image_path, story_style) + $PREV.image_path chaining.
- blender.mdx: correct default --model (auto-selected) and --stats (False);
  drop unsupported --logging-level from example.
- emr.mdx: add missing CLI subcommands (process, stats, test).
- jira.mdx: fix MCP bridge endpoint /rpc → / (JSON-RPC root).

Reference (CLI)
- Remove nonexistent gaia init profiles talk/blender/jira/docker; note they use
  the chat profile. Add Note for currently-supported profiles.
- Add missing gaia cache {status,clear} section with --all/--context7 flags.
- Document missing flags on gaia chat (--allowed-paths, --ui-dist), gaia api
  start (--show-prompts, --streaming, --step-through), gaia download
  (--clear-cache), gaia mcp start (--auth-token, --log-file, --verbose,
  --ctx-size), gaia mcp test (--tool), and gaia mcp agent (positional request,
  --domain, --context). Add top-level --ui-dist. Clarify that --base-url works
  on most subcommands.
- Warn about port-8080 conflict between gaia api start and gaia mcp docker.
- Fix gaia chat --streaming (doesn't exist) → --stream; correct default models
  to "auto-selected".

FAQ
- Remove reference to gaia update --check (command does not exist).

Deployment
- testing-electron.mdx: fix stale tests/apps/ path and test-file names; all
  Electron tests live under tests/electron/.

Specs
- plugin-registry.mdx: rewrite against real src/gaia/agents/registry.py
  (AgentManifest/AgentRegistration/KNOWN_TOOLS + ~/.gaia/agents/ discovery);
  previous version described an API that does not exist.
- database-mixin.mdx: rewrite against real src/gaia/database/mixin.py (stdlib
  sqlite3; init_db/query/insert/update/delete/transaction/execute/table_exists).
  Previous version documented an invented SQLAlchemy API.
- agent-ui-server.mdx: reflect routers/ split + dispatch/document_monitor/
  dependencies/_chat_helpers modules; correct "closures in create_app()" claim.
- console.mdx: add missing model_id parameter to print_processing_start.
- file-change-handler.mdx, test-utilities.mdx: remove stale "planned" language
  and outdated "development" badges.

Reference
- agent-core-loop-architecture.md: correct Agent.process() → process_query().

C++ docs
- Remove nonexistent GAIA_ENABLE_SSL CMake flag (OpenSSL is auto-detected).
- testing.mdx / quickstart.mdx: undercount of 8 → correct 12 unit-test modules;
  add test_decision/test_security/test_sse_parser/test_lemonade_client rows.
- overview.mdx: drop "streaming (planned)" — it ships via chatCompletionsStreaming
  + SseParser.
- wifi-agent.mdx: line-count ~1100 → ~790 (actual).

Playbooks
- hardware-advisor: correct Lemonade device keys gpu/npu → amd_igpu/amd_npu.
- chat-agent/part-3: replace nonexistent registry.register() with AGENT_MODELS
  static-dict workflow; fix agent.execute_tool() → agent.rag.query direct call;
  clear_index() → clear_cache().
- emr-agent/part-3: fix DatabaseMixin.update positional signature; rename the
  override hook _setup_database → real _init_database.

Navigation
- docs.json: add orphan pages (deployment/code-signing, plans/installer,
  plans/desktop-installer). No broken refs remain.

CLAUDE.md
- Vite dev-server port 5173 → 5174 (matches vite.config.ts + dev.mdx).
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes labels Apr 17, 2026
kovtcharov and others added 3 commits April 17, 2026 10:12
The rewritten plugin-registry.mdx had an inline regex
`^[a-z0-9]([a-z0-9-]{0,50}[a-z0-9])?$` wrapped in backticks that
util/check_doc_links.py was parsing as a markdown link
([text](url)), producing a bogus broken-link failure. Replace the
literal regex with a prose description and point readers at
validate_id in src/gaia/agents/registry.py for the exact pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two more parallel review agents scanned the pages pass 1+2 skimmed; this
commit lands the concrete findings.

SDK pages
- examples.mdx: rag.get_indexed_files() doesn't exist → get_status() with
  indexed_files key. vlm.extract_from_image(image_bytes, prompt) passes the
  prompt as positional (which is image_num) → use prompt= kwarg.
- applications.mdx: SummarizerApp.summarize_file(input_file=, output_file=)
  kwargs don't exist; real signature is file_path=/styles=/input_type=. The
  email example called summarize_text() → real method is summarize(). CLI
  syntax corrected: -i/--input, space-separated styles (nargs="+"), -o/--output.
- testing.mdx: agent.execute_tool() is not public; show direct tool-function
  call via _TOOL_REGISTRY and note tests can also mock via patch. AgentSDK
  has no .complete(); use .send() returning AgentResponse.
- advanced-patterns.mdx: drop redundant Agent in MRO (ApiAgent already
  extends Agent); add FileSearchToolsMixin since FileToolsMixin only
  registers add_watch_directory.
- api-reference.mdx: corrected Tool Mixins table — FileToolsMixin is for
  directory watching, FileSearchToolsMixin is the file-I/O mixin.
- packaging.mdx: prepend a Warning that the `gaia package` CLI sketched in
  the examples is a roadmap target, not an existing command.

Quickstart & index
- quickstart.mdx: Node.js requirement 18+ → 20+ (matches setup.mdx and
  actual Electron app). Stale agent-ui version pin 0.16.1 → 0.17.2. Wrong
  MCP route /sdk/sdks/mcp → /sdk/infrastructure/mcp.
- index.mdx: same MCP route fix.

Plans
- plans/mcp-client.mdx: status "Planning" → "Shipped (base mixin in v0.15.4;
  remaining work is CUA-specific tooling)". Matches roadmap.
- plans/docker-containers.mdx: dropped the stale "Q1 2026" prefix.
- plans/setup-wizard.mdx: Lemonade 9.2.0 → 10.0.0 in all sample outputs.
- plans/installer.mdx: Lemonade 9.1.4 → 10.0.0 in update-check example.

Individual mixin specs (gaps found in pass 2 but not yet filled)
- file-io-tools-mixin.mdx: add write_markdown_file and update_gaia_md tools.
- error-fixing-mixin.mdx: add create_workflow_plan tool.
- web-tools-mixin.mdx: add manage_prisma_client tool.
- file-search-mixin.mdx: add browse_directory / get_file_info /
  analyze_data_file / list_recent_files tools, and name the register method.

Playbooks
- hardware-advisor: use @tool(atomic=True) to match the real
  examples/hardware_advisor_agent.py source.

Local link check passes (752/752).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two more parallel review agents swept the remaining agent/code-infra specs
plus reference and deployment pages, and spot-checked source-level docstrings.

Agent/app specs
- spec/summarizer-app.mdx: SummarizerApp is a thin wrapper — the spec had
  invented five methods (detect_content_type / generate_*_prompt /
  summarize_with_style / summarize_combined) that live on SummarizerAgent,
  not SummarizerApp. Rewrote to the real 4-method surface (__init__,
  summarize, summarize_file, summarize_directory) with a pointer to
  SummarizerAgent for the internal pipeline. Also added the module-level
  email helpers.
- spec/api-server.mdx: rewritten AgentRegistry section — removed fictional
  register_agent()/_agents dict/workspace_root; documented the real
  AGENT_MODELS static dict + on-demand importlib loader + list_models().
  Updated create_chat_completion pseudocode to match real get_agent(model_id)
  signature.
- spec/component-status.mdx: marked DatabaseMixin, AgentRegistry as Available
  (both shipped); removed "Issue #1"/"Issue #4" stubs and clarified that
  the Agent UI uses AgentRegistry while the API server uses AGENT_MODELS.
- spec/routing-agent.mdx: added Warning that today RoutingAgent only routes
  to CodeAgent, and that Code Agent path enforces TypeScript/Next.js (other
  languages either coerce to TS or exit with a clear message).
- spec/chat-agent.mdx: ChatAgentConfig fields added — library_documents,
  debug_prompts, ui_session_id, enable_sd_tools. base_url type fixed to
  Optional[str] (None → env var → default).
- spec/talk-sdk.mdx: added missing mic_threshold=0.003 field on TalkConfig.
- spec/code-models.mdx: added MethodSpec and LintIssue dataclasses (were
  missing).
- spec/validators.mdx: added RequirementsValidator (re-exported from the
  validators package) with its hallucination-detection contract.

Reference / deployment docs
- reference/features.mdx: removed invented `gaia uninstall --models`; wrong
  `gaia init --profile` choice list corrected (added sd/mcp/vlm); wrong
  `gaia summarize --styles` values corrected (brief/detailed/bullets/
  executive/participants/action_items/all).
- reference/troubleshooting.mdx: replaced bogus port 5000 with real default
  8080; fixed `gaia uninstall --models` → `--purge --purge-models --yes`.
- reference/api.mdx: `gaia api start --background` doesn't exist; documented
  the real shell-detach pattern (nohup/Start-Process) since only
  `gaia mcp start` exposes --background natively.
- deployment/ui.mdx: wrong installer filenames and package name; corrected
  to the real `gaia-agent-ui-<ver>-<arch>-setup.exe/.deb` artifacts and the
  `gaia-desktop` apt package; npm binary is `gaia-ui`, not `gaia`.

Source-code docstrings
- src/gaia/chat/sdk.py: SimpleChat class docstring showed `await chat.ask()`
  but ask() is sync → fixed. `assistant_name` default documented as
  "assistant" but is actually "gaia" → fixed.
- src/gaia/chat/sdk.py: AgentSession docstring called `await work_chat.ask()`
  but sessions return an AgentSDK (not SimpleChat), and AgentSDK uses
  .send() not .ask() → rewritten to show correct API.
- src/gaia/rag/sdk.py: RAGSDK class docstring said "PDF document Q&A" but
  the SDK handles ~10 file formats → broadened to match reality.

Local link check passes (753/753).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions github-actions Bot added code-agent chat Chat SDK changes rag RAG system changes performance Performance-critical changes labels Apr 17, 2026
Final audit agent reviewed docs/guides/agent-ui.mdx + docs/sdk/sdks/agent-ui.mdx
+ docs/reference/dev.mdx and spot-checked four minor spec items.

Agent UI SDK reference (was ~60% coverage)
- Added 20+ missing REST endpoints across documents, sessions, chat, files,
  agents, mcp, tunnel, and system routers — every router module under
  src/gaia/ui/routers/ now has at least its surface summarised:
  * Agents: GET /api/agents, GET /api/agents/{agent_id}
  * MCP (entire router): /api/mcp/{servers,catalog,status} + enable/disable/tools
  * Tunnel (entire router): /api/tunnel/{start,stop,status}
  * Chat: POST /api/chat/confirm-tool
  * Documents: /upload, /monitor/status, /{id}/status, /{id}/cancel, /index-folder
  * Sessions: message delete + delete-and-below
  * System: /api/system/tasks
  * Files: upload, browse, search, preview, image
- create_app signature updated to include webui_dist param.
- app.state documentation expanded to cover agent_registry, dispatch_queue,
  document_monitor.
- Database schema: added inference_stats column and the `settings` table.

Dev docs (docs/reference/dev.mdx)
- Extras list expanded to cover all 12 extras from setup.py (dev/ui/api/rag/
  talk/mcp/audio/blender/image/eval/youtube/lint) — the missing `[ui]` extra
  was blocking the Agent UI install path.
- Removed the stale `--extra-index-url` workaround for uv — pyproject.toml
  already wires pytorch-cpu through tool.uv.sources. Clarified it's pip-only.
- Python 3.10+ supported (not 3.12-only); clarified 3.12 is recommended
  because black/mypy are pinned to py312.
- Added Linting + Running Tests sections documenting the 8 lint.py checks
  and the conftest.py fixtures (api_client / require_lemonade / …).

Minor spec spot-checks
- audio-client.mdx: added mic_threshold=0.003 __init__ param.
- llm-client.mdx: package-exports list now includes VLMClient (real
  gaia.llm.__init__ exports it too).

Source docstring
- src/gaia/audio/audio_client.py: AudioClient class docstring was a single
  line with zero param docs. Added a complete runnable asyncio example
  plus a pointer to WhisperAsr.list_audio_devices() for device enumeration.

Local link check passes (753/753).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions github-actions Bot added llm LLM backend changes audio Audio (ASR/TTS) changes labels Apr 17, 2026
kovtcharov and others added 4 commits April 17, 2026 11:08
Final audit agent swept release notes, integrations, and plan docs not
deep-reviewed earlier.

Integrations
- integrations/vscode.mdx: removed invented VSCode settings (gaia.apiUrl /
  gaia.defaultModel) — src/vscode/gaia/package.json has no configuration
  contribution point. Replaced the Settings table + troubleshooting refs
  with accurate language about the hardcoded default URL.
- integrations/mcp.mdx: replaced reference to nonexistent
  tests/mcp/test_mcp_docker.py with test_mcp_summarize.py and clarified
  that `gaia mcp docker` is a separate FastMCP server. Added missing
  /status and /summarize rows to the REST endpoints table.

Release notes
- releases/v0.15.4.mdx: removed "Checks Node.js prerequisites" claim — the
  real mcp_init.py only writes a starter mcp_servers.json. Fixed typo
  "variuous" → "various".
- releases/v0.16.1.mdx: compare link href was v0.16.0...HEAD → v0.16.0...v0.16.1
  so the diff actually matches the tag.

Plans
- plans/agent-hub.mdx: seed agents table trimmed non-existent agents
  (ComputerUseAgent, TalkAgent as an Agent subclass) and added a
  forward-looking note pointing to the CUA plan. Added SDAgent and
  clarified Talk SDK provides voice I/O for any agent rather than being
  its own Agent class.
- plans/oem-bundling.mdx: Qwen3-8B-Instruct-GGUF → Qwen3-8B-GGUF (the real
  model name used in installer/init_command.py).
- plans/security-model.mdx: RAG pickle vulnerability is no longer a pending
  "current vulnerability" — v0.17.2 shipped a magic-header + size-cap guard
  (src/gaia/rag/sdk.py:44). Updated section 13 and the attack-surface table
  to reflect what shipped and what remains as follow-up work.

Local link check passes (753/753).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Self-review agent audited the previous 5 commits for consistency and swept
glossary / install-guide / examples dir. Findings:

Reverting two regressions from the earlier passes
- docs/index.mdx and docs/quickstart.mdx linked to /sdk/infrastructure/mcp
  for the "Connect to External Tools" / "MCP Integration" cards, but that
  page is about *building* agents as MCP servers. The MCP **client** page
  is /sdk/sdks/mcp (confirmed by docs.json redirect
  /guides/mcp/client → /sdk/sdks/mcp). Reverted both.
- docs/sdk/sdks/rag.mdx had a stale `llm = LLMClient()` in the "Without RAG"
  tab that pre-existed and I missed in earlier fixes → create_client().

Stale public API references found in pre-existing specs
- spec/agent-base.mdx:205 documented a public `execute_tool()` method that
  doesn't exist on Agent (only `_execute_tool` does, privately). Rewrote
  the spec block to reflect the private method and point callers at the
  _TOOL_REGISTRY pattern for programmatic invocation.
- spec/agent-base.mdx:553 test example used the fictional `agent.execute_tool()`.
  Updated to call the registered function directly via _TOOL_REGISTRY.
- spec/test-utilities.mdx had three examples using the non-existent
  `agent.execute_tool()`; rewrote each to use _TOOL_REGISTRY directly.

Glossary / plan consistency
- docs/glossary.mdx:287 showed LEMONADE_BASE_URL example as
  http://localhost:8080 — Lemonade runs on 8000; 8080 is the GAIA API
  server. Corrected to 8000/api/v1 with an explicit note about the 8080
  collision.
- docs/plans/docker-containers.mdx: Vite dev port 5173 → 5174 (3 places,
  including the ports table and EXPOSE lines).

Local link check passes (753/753).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Direct grep sweep for known-bad patterns found two final items:

- docs/guides/agent-ui.mdx: Node.js 18+ → 20+ (matches quickstart + the
  actual macOS brew install command that shows node@20 right alongside it).
- docs/plans/installer.mdx: stale `1.2.0 / 1.3.0` example versions in the
  `gaia update --check` mock output updated to `0.17.1 / 0.17.2` so the
  illustration matches the current product version family.

Link check passes (753/753). All CI checks still green on the prior commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two plan documents described work that has since shipped — they were
creating confusion about what's current vs what's still planned.

Deleted
- docs/plans/installer.mdx — `gaia init`, `gaia uninstall --purge*`, and
  the bundled Lemonade MSI installer (#774, #781) have all shipped in
  v0.17.x. The remaining aspirational pieces (`gaia update`, one-liner
  install scripts) are better tracked in the active
  [desktop-installer.mdx](./desktop-installer.mdx) plan.
- docs/plans/mcp-client.mdx — the MCP Client Mixin shipped in v0.15.4
  (see `src/gaia/mcp/mixin.py`). Tracked on the roadmap as "shipped".

Navigation + cross-refs updated
- docs.json: removed the two orphan pages from Roadmap → Infrastructure.
- docs/plans/desktop-installer.mdx: replaced four references to the deleted
  installer.mdx with generic pointers to the CLI install path / dev.mdx.
- docs/plans/cua.mdx: "MCP Client Mixin Plan" link → /sdk/infrastructure/mcp
  with a note that the base mixin shipped in v0.15.4.
- docs/plans/setup-wizard.mdx: "Desktop installer via NSIS" link now points
  to desktop-installer.mdx (was installer.mdx).
- docs/plans/oem-bundling.mdx: related-plans pointer updated.
- docs/roadmap.mdx: "Detailed plan: Installer" → desktop-installer.
- docs/sdk/packaging.mdx: "Lightweight Installer Plan" → desktop-installer.
- docs/guides/install.mdx: "Python CLI install plan" pointer → dev.mdx.

Link check passes (751/751).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The pickle→JSON+HMAC change in #768 imported json at module scope, but
two older local re-imports inside _extract_text_from_json and the
LLM-based chunking path were left behind. Pylint W0404 is treated as a
critical error in CI and was failing the Code Quality Checks job.

Both local imports removed; json is still available at module level.
The Agent UI guide previously only documented the npm and Python-CLI
install paths. Now that signed .exe/.deb installers ship on each GitHub
release, call them out as the easiest install path for non-developer end
users — with concrete artifact filenames matching electron-builder.yml
and a pointer to /deployment/ui for more detail. Also add a Tip to the
Agent UI SDK reference so developers landing there are redirected to the
end-user install docs.
@github-actions

Copy link
Copy Markdown
Contributor

Summary

Large docs-vs-source alignment sweep — 82 files, mostly MDX. The code touches are tiny and correct (duplicate json imports removed from rag/sdk.py; docstrings in chat/sdk.py and audio/audio_client.py now match sync vs async reality). The three spec rewrites that actually needed spot-checking split down the middle: database-mixin.mdx matches src/gaia/database/mixin.py exactly, but plugin-registry.mdx still misrepresents several things about src/gaia/agents/registry.py and should be corrected before merge. There are also a handful of textual artifacts from the installer.mdx deletion — the sed-like replacement produced a few ungrammatical sentences in docs/plans/desktop-installer.mdx.

Issues Found

🟡 Important

1. plugin-registry.mdx rewrite disagrees with src/gaia/agents/registry.py in four places (docs/spec/plugin-registry.mdx)

The rewrite is a big improvement over the old entry-points fiction, but it still doesn't quite match the code that actually ships:

Spec claim Actual source (src/gaia/agents/registry.py)
Manifest filename manifest.yaml agent.yaml (registry.py:211, 221)
agent.py "must export a factory(**kwargs) function" Must expose an Agent subclass with class attributes AGENT_ID and AGENT_NAME; the registry builds the factory itself (registry.py:247–287)
Registry method table lists refresh() No such method exists — only discover(), get(), list(), create_agent(), resolve_model()
get(id) "returns the registration for id or raise KeyError" Returns Optional[AgentRegistration] — None on miss (registry.py:527–529). The raising variant is create_agent().

Minimum fix: swap manifest.yaml → agent.yaml in the directory-layout block and the YAML example heading, drop refresh() from the methods table, correct the get() return contract, and rewrite the Python-agent paragraph to describe the subclass-discovery convention (with an AGENT_ID = "..." / AGENT_NAME = "..." snippet). Worth adding create_agent(agent_id, **kwargs) to the methods table too — it's the primary entry point used by the UI.

2. installer.mdx deletion left mangled prose in desktop-installer.mdx (docs/plans/desktop-installer.mdx)

Four spots read like a find-and-replace that didn't account for grammar. All of these should be tightened before merge:

  • Line 13: **Companion plan:** the Python CLI install path covers the **Python CLI** install path. — duplicated phrase, broken sentence.
  • Line 241: Already listed as a "future command" in the existing the Python CLI install path (lines 437–442) — "the existing the" is ungrammatical, and the (lines 437–442) citation now points at a deleted file.
  • Line 533: Update the CLI install path (see \docs/reference/dev.mdx`) (the existing CLI install plan) to cross-reference…` — double parenthetical, and "update the install path" is an odd verb for a guide page.
  • Line 891: Companion plan: the Python CLI install path — Python CLI install, \gaia init`…` — "the Python CLI install path — Python CLI install" reads as a stutter.

Suggested pattern for line 13:

**Companion path:** the Python CLI install flow (`install.ps1`/`install.sh` + `gaia init`, documented in [`docs/reference/dev.mdx`](docs/reference/dev.mdx)) is the developer / headless alternative. This document covers the **Electron desktop app** installer — the **primary install path for non-developer end users**.

The other three need similar hand-cleanup — the replacement token needs a real noun phrase, not a verb-less placeholder.

🟢 Minor

3. Anchor-style link reads oddly (docs/plans/cua.mdx:387)

This agent is a specific implementation of the MCP Client Mixin pattern (the base mixin shipped in v0.15.4):

/sdk/infrastructure/mcp is the MCP protocol page, not the client mixin page. Since the plan document plans/mcp-client.mdx is being deleted (correctly — it shipped), consider linking to /sdk/sdks/mcp which is the actual client SDK reference, or dropping the link and just keeping the prose.

4. docs/releases/v0.16.1.mdx compare link — the PR body claims this was retargeted to HEAD, but I didn't see a clean "compare link" diff surface. Worth a final eyeball to make sure the tag is right (v0.16.0...v0.16.1 vs v0.16.0...HEAD) — release-note compare links are the kind of thing that break silently.

5. docs/plans/agent-hub.mdx:49 — introducing "née ChatAgent" parenthetical inside a table cell is fine, but the rename is noted as landing in v0.20.0 (future). Today on main, src/gaia/agents/chat/agent.py still defines ChatAgent, so the table header reading "GaiaAgent" is aspirational. Consider **ChatAgent** (will rename to **GaiaAgent** in v0.20.0) for correctness today — current phrasing asserts the post-rename name as the primary label.

Strengths

  • Real bug caught and fixed — the duplicate import json inside RAGSDK._extract_text_from_json and the LLM-chunking helper (src/gaia/rag/sdk.py:962, 1109) was masking the module-level import; cleanup is a legitimate linter-visible correctness win, not just cosmetic.
  • chat/sdk.py docstring correction is the most user-impact-per-line change in the PR — AgentSDK.send, SimpleChat.ask, AgentSession.create_session are all plain def, and the old await-sprinkled examples would TypeError immediately when copy-pasted. Verified against source (sdk.py:342, 1053, 1120).
  • database-mixin.mdx rewrite is accurate end-to-end — the old spec invented an SQLAlchemy-Core API (execute_query, initialize_database, connection pooling, PostgreSQL/MySQL support) that never existed; new version matches the stdlib-sqlite3 reality in src/gaia/database/mixin.py including the __set_-prefixed UPDATE placeholders (mixin.py:180) and lastrowid INSERT return (mixin.py:149).
  • Test plan actually did the work — 751/751 internal link check + JSX balance + docs.json validation is exactly the right shape for a sweep this wide; the residual issues above are the ones a link-checker can't see.
  • Deletion of plans/installer.mdx and plans/mcp-client.mdx is correct — both describe shipped features; keeping them as "planning" docs is worse than deleting.

Verdict

Request changes — the plugin-registry.mdx rewrite still misstates four things about the shipping API (manifest filename, Python-agent convention, refresh() phantom method, get() return contract). Those are user-facing SDK documentation errors and the kind of drift this PR is explicitly trying to eliminate, so they should be fixed in the same pass rather than deferred.

The desktop-installer.mdx prose cleanup is the only other blocker — it's a readability problem that a reviewer will stumble over on page 1. Everything else (CUA mcp-client link, v0.16.1 compare link, GaiaAgent tense) is 🟢 and can ship either way.

Code changes (rag/sdk.py, chat/sdk.py, audio/audio_client.py) are clean and ready to merge on their own.

@kovtcharov
kovtcharov added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit c4bd15f Apr 17, 2026
28 checks passed
@kovtcharov
kovtcharov deleted the docs/review-fixes-apr17 branch April 17, 2026 22:57
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge code review

Noting this merged 2026-04-17 22:57 UTC — posting follow-up findings from a full diff read so they can be fixed up in a follow-on PR.

Summary

Large docs-vs-source drift sweep across 79 .mdx files plus three src/ docstring cleanups. The source-side claims in the PR body all check out: AgentSDK.send / send_stream / SimpleChat.ask / AgentSession.create_session are regular def (verified at src/gaia/chat/sdk.py:342,428,1053,1120), so removing the await / async for from their docstring examples is correct; AudioClient.start_voice_chat really is async (src/gaia/audio/audio_client.py:79); the RAG class docstring expansion reflects the real supported-format list. Deleting plans/installer.mdx and plans/mcp-client.mdx is the right call — both were documenting already-shipped work — and the docs/docs.json nav swap to plans/desktop-installer + deployment/code-signing is consistent.

Three issues surfaced during re-read, all from the bulk removal of plans/installer.mdx. None are blocking, but together they mean "the companion plan was installer.mdx" got partially fixed — the doc-internal sweep left ungrammatical sentences behind and the out-of-tree references (CLAUDE.md, .claude/agents/) were missed entirely.

Issues

🟡 Important

1. docs/plans/desktop-installer.mdx — sed artifacts where installer.mdx was replaced with the phrase "the Python CLI install path"

Three locations where the replacement lands inside a sentence that had installer.mdx as a grammatical subject, producing self-referential / doubled-article sentences:

docs/plans/desktop-installer.mdx:13

**Companion plan:** [`plans/setup-wizard.mdx`](setup-wizard) covers the **Python CLI** install path. This document covers the **Electron desktop app** installer — which is the **primary install path for non-developer end users**.

(current text reads "the Python CLI install path covers the Python CLI install path" — tautological. Whatever the intended companion doc is, that's what should link here. If there is no companion doc any more, drop the sentence.)

docs/plans/desktop-installer.mdx:241

**One implementation, four front-ends.** Lives at `src/gaia/installer/uninstall_command.py`. `gaia uninstall` already exists as a CLI command; this plan wires it into the Electron desktop app.

(current reads "in the existing the Python CLI install path (lines 437–442)" — the "lines 437–442" is a stale pointer into the deleted installer.mdx.)

docs/plans/desktop-installer.mdx:891

- `gaia` Python CLI install path — `gaia init`, `gaia update`, and (post-Phase D) `gaia uninstall`

(dropping "Companion plan:" since the companion doc no longer exists.)

2. CLAUDE.md:497-498 still links to the deleted plan docs

- [`docs/plans/installer.mdx`](docs/plans/installer.mdx) - Desktop installer
- [`docs/plans/mcp-client.mdx`](docs/plans/mcp-client.mdx) - MCP client integration

Both paths now 404. CLAUDE.md is loaded into every Claude Code session that opens this repo, so this is a higher-impact broken reference than the in-tree doc links. The check_doc_links.py --internal-only run in the PR's test plan doesn't walk CLAUDE.md, which is how this slipped through.

Suggested fix: replace line 497 with docs/plans/desktop-installer.mdx, delete line 498.

**Infrastructure:**
- [`docs/plans/desktop-installer.mdx`](docs/plans/desktop-installer.mdx) - Desktop installer (Electron + NSIS + DMG + DEB)
- [`docs/plans/cua.mdx`](docs/plans/cua.mdx) - Computer Use Agent
- [`docs/plans/docker-containers.mdx`](docs/plans/docker-containers.mdx) - Docker deployment

3. .claude/agents/ still points at the deleted installer plan

  • .claude/agents/frontend-developer.md:22 — Installer/packaging → see docs/plans/installer.mdx``
  • .claude/agents/docker-specialist.md:21 — Installer packaging (MSI/NSIS) → see src/gaia/installer/anddocs/plans/installer.mdx``

Both should retarget docs/plans/desktop-installer.mdx. Same root cause as #2 — link checker didn't walk this tree.

🟢 Minor

4. src/gaia/rag/sdk.py:6 — module-level docstring still lists only PDF

"""
GAIA RAG SDK - Simple PDF document retrieval and Q&A
"""

The class docstring at src/gaia/rag/sdk.py:133 was expanded to the accurate list ("PDF, TXT, MD, RST, LOG, CSV, JSON, XLSX, HTML, and more") but the module header at line 6 was left as PDF-only. Trivial to align:

"""
GAIA RAG SDK - Simple document retrieval and Q&A (PDF, TXT, MD, RST, LOG, CSV, JSON, XLSX, HTML, and more)
"""

Strengths

  • Source claims verified end-to-end. Every src/ docstring change maps cleanly onto the real code — send/send_stream/ask/create_session are sync, start_voice_chat is async, RAG file-format list matches the ingestion code path. Removing the incorrect await from the public SDK examples was the highest-ROI change in the PR — anyone who copy-pasted those examples was getting TypeError: object Response can't be used in 'await' expression.
  • Deletion discipline. Removing plans/installer.mdx (install / uninstall / MSI shipped in v0.17.x) and plans/mcp-client.mdx (mixin shipped in v0.15.4) and retargeting in-tree cross-refs is the right call. Shipped-work plan docs accumulate rot fast.
  • Spec rewrites hit the big ones. plugin-registry.mdx, database-mixin.mdx, summarizer-app.mdx, agent-base.mdx — these were actively misleading (SQLAlchemy vs stdlib sqlite3, invented register_agent() vs AgentRegistry YAML manifests, public execute_tool that doesn't exist). The rewrites read like they came from actual source-reads, not guesses.
  • CLI reference completeness. The gaia cache section, the 8080 port collision warning between gaia api start and gaia mcp docker, and the --ui-dist / --allowed-paths / --clear-cache flag additions close a real user-facing gap.
  • PR description is the correct shape. Short summary, bulleted threads each with a why, skipped-area callout, test plan with concrete commands. Matches the CLAUDE.md PR-description guidance to the letter.

Verdict

LGTM post-merge with three cleanup follow-ups. None of the issues above changes the correctness of the source-side fixes (which are the parts developers actually hit as bugs). The sed artifacts in desktop-installer.mdx and the stale references in CLAUDE.md / .claude/agents/ are a single 10-minute follow-on PR — worth bundling together since they all trace to one cause (the installer.mdx removal not sweeping reference-sites outside docs/).

Suggested follow-up PR title: docs(plans): clean up desktop-installer references after installer.mdx removal.

@itomek itomek mentioned this pull request Apr 20, 2026
5 of 6 tasks
github-merge-queue Bot pushed a commit that referenced this pull request Apr 20, 2026
# GAIA v0.17.3 Release Notes

GAIA v0.17.3 is an extensibility and resilience release. You can now
package your own agents into a custom GAIA installer and seed them on
first launch, point GAIA at alternative OpenAI-compatible inference
servers from the C++ library (Ollama, for example), and start from three
new reference agents (weather, RAG Q&A, HTML mockup) that execute
against real Lemonade hardware in CI. It also hardens the RAG cache
against an insecure-deserialization class of bug (CWE-502) — all users
should upgrade.

**Why upgrade:**
- **Ship your own GAIA** — Export and import agents between machines,
follow a new guide to produce a custom installer that seeds your agents
on first launch, and on Windows install everything in one step because
the installer now includes the Lemonade Server MSI.
- **Work with alternative inference backends** — The C++ library now
preserves OpenAI-compatible `/v1` base URLs instead of rewriting them to
`/api/v1`, so servers that expose the standard `/v1` path (Ollama, for
example) work out of the box.
- **Start from a working example** — Three new reference agents (weather
via MCP, RAG document Q&A, HTML landing-page generator) with integration
tests that actually execute against Lemonade on a Strix CI runner.
- **Safer RAG cache** — Replaces `pickle` deserialization with JSON +
HMAC-SHA256 (CWE-502). Unsigned or tampered caches are rejected and
transparently rebuilt on the next query.
- **Better document handling** — Encrypted or corrupted PDFs now produce
distinct, actionable errors (`EncryptedPDFError`, `CorruptedPDFError`)
instead of generic failures, and the RAG index is hardened for
concurrent queries.

---

## What's New

### Custom Installers and Agent Portability

You can now package a custom GAIA installer that ships with your own
agents pre-loaded, and move agents between machines with export/import
(PR #795). On Windows, the official installer now includes the Lemonade
Server MSI and runs it during install, so a fresh machine has the
complete local-LLM stack after a single download (PR #781).

**What you can do:**
- Export an agent from `~/.gaia/agents/` to a portable bundle with `gaia
agents export` and import it on another machine with `gaia agents
import`
- Follow the new custom-installer playbook at
[`docs/playbooks/custom-installer/index.mdx`](/playbooks/custom-installer)
to distribute GAIA with your agents pre-loaded — useful for workshops,
team deployments, and internal tooling
- On Windows, the installer now includes Lemonade Server — no separate
download for a complete first-run experience

**Under the hood:**
- `gaia agents export` / `gaia agents import` CLI commands round-trip
agents between machines as portable bundles
- First-launch agent seeder
(`src/gaia/apps/webui/services/agent-seeder.cjs`) copies
`<resourcesPath>/agents/<id>/` into `~/.gaia/agents/<id>/` the first
time the app starts
- Windows NSIS installer embeds `lemonade-server-minimal.msi` into
`$PLUGINSDIR` and runs it via `msiexec /i ... /qn /norestart` during
install (auto-cleaned on exit)

---

### Broader Backend Compatibility in the C++ Library

The C++ library now preserves OpenAI-compatible `/v1` base URLs (PR
#773) instead of rewriting them to `/api/v1`. That means inference
servers that expose the standard OpenAI `/v1` path — for example, Ollama
at `http://localhost:11434/v1` — work out of the box without needing a
special adapter.

---

### Reference Agents and Real-Hardware Integration Tests

Three new example agents and a Strix-runner CI workflow land together
(PR #340).

**What you can do:**
- Copy `examples/weather_agent.py`, `examples/rag_doc_agent.py`, or
`examples/product_mockup_agent.py` as a starting point for your own
agents
- Run the new integration tests locally against Lemonade to validate
agents end-to-end, not just structurally

**Under the hood:**
- `tests/integration/test_example_agents.py` executes agents and
validates responses with a 5-minute-per-test timeout
- `.github/workflows/test_examples.yml` runs on the self-hosted Strix
runner (`stx` label) with Lemonade serving `Qwen3-4B-Instruct-2507-GGUF`
- Docs homepage refreshed with a technical value prop ("Agent SDK for
AMD Ryzen AI") and MCP / CUA added to the capabilities list

---

### Smarter PDF Handling in RAG

Encrypted and corrupted PDFs now surface as distinct, actionable errors
(`EncryptedPDFError`, `CorruptedPDFError`, `EmptyPDFError`) instead of
generic failures or silent 0-chunk indexes (PR #784, closes #451).
Encrypted PDFs are detected before extraction; corrupted PDFs are caught
during extraction with a clear message. Combined with the
indexing-failure surfacing in PR #723, you get a visible indexing-failed
status the moment a document fails — and the RAG index itself is now
thread-safe under concurrent queries (PR #746).

---

## Security

### RAG Cache Deserialization Replaced with JSON + HMAC

Fixes an insecure-deserialization issue in the RAG cache (CWE-502, PR
#768). Previously, cached document indexes were serialized with Python
`pickle`; if an attacker could write to `~/.gaia/` — via a shared drive,
a sync conflict, or a malicious extension — loading that cache could
execute arbitrary code.

v0.17.3 replaces `pickle` with signed JSON: caches are now serialized as
JSON and authenticated with HMAC-SHA256 using a per-install key stored
at `~/.gaia/cache/hmac.key`. Unsigned or tampered caches are rejected
and transparently rebuilt on the next query. Old `.pkl` caches from
previous GAIA versions are ignored and re-indexed the next time you
query a document.

**You should upgrade if you** share `~/.gaia/` across machines (Dropbox,
iCloud, network home directories), run GAIA in a multi-user environment,
or have ever imported RAG caches from another source.

---

## Bug Fixes

- **Ask Agent attaches files before sending to chat** (PR #725) —
Dropped files are indexed into RAG and attached to the active session
before the prompt is consumed, so the model sees the document on the
first turn instead of the second.
- **Document indexing failures are surfaced** (PR #723) — A document
that produces 0 chunks now raises `RuntimeError` in the SDK and surfaces
as `indexing_status: failed` in the UI, instead of looking like a silent
success. Covers RAG SDK, background indexing, and re-index paths.
- **Encrypted or corrupted PDFs produce actionable errors** (PR #784,
closes #451) — RAG now raises distinct `EncryptedPDFError` and
`CorruptedPDFError` exceptions instead of generic failures, so you see
exactly what went wrong.
- **RAG index thread safety hardened** (PR #746) — Adds `RLock`
protection around index mutation paths and rebuilds chunk/index state
atomically before publishing it, so concurrent queries read consistent
snapshots and failed rebuilds no longer leak partial state.
- **MCP JSON-RPC handler guards against non-dict bodies** (PR #803) — A
malformed JSON-RPC payload (array, string, null) now returns HTTP 400
`Invalid Request: expected JSON object` instead of an HTTP 500 from a
`TypeError`.
- **File-search count aligned with accessible results** (PR #754) — The
returned count now matches the number of files the tool actually
surfaces, instead of a pre-filter total that over-reported results the
caller could not access.
- **Tracked block cursor replaces misplaced decorative cursor** (PR
#727) — Fixes the mis-positioned blinking cursor in the chat input box,
which now tracks the actual caret position via a mirror-div technique.
- **Ad-hoc sign the macOS app bundle instead of skipping code signing**
(PR #765) — The `.app` bundle inside the DMG now carries an ad-hoc
signature, so Gatekeeper presents a single "Open Anyway" bypass in
System Settings instead of the unrecoverable "is damaged" error. Full
Apple Developer ID signing is still being finalized.

---

## Release & CI

- **Publish workflow: single approval gate, no legacy Electron apps**
(PR #758) — Removed the legacy jira and example standalone Electron apps
from the publish pipeline; a single `publish` environment gate governs
PyPI, npm, and installer publishing.
- **Claude CI modernization** (PR #797, PR #799, PR #783) — Migrated all
four `claude-code-action` call sites to `v1.0.99` (pinned by SHA, fixes
an issue-handler hang), bumped `--max-turns` from 20 to 50 on both
`pr-review` and `pr-comment` for deeper analysis, upgraded to Opus 4.7,
standardized 23 subagent definitions with explicit when-to-use sections
and tool allowlists, and added agent-builder tooling (manifest schema,
`lint.py --agents`, BuilderAgent mixins).

---

## Docs

- **Roadmap overhaul** (PR #710) — Milestone-aligned plans with
voice-first as P0 and 9 new plan documents for upcoming initiatives.
- **Plan: email triage agent** (PR #796) — Specification for an upcoming
email triage agent.
- **Docs/source drift resolved** (PR #794) — Fixed broken SDK examples
across 15 docs, rewrote 5 spec files against the current source
(including two that documented entire APIs that don't exist in code),
added 20+ missing CLI flags to the CLI reference, and removed 2
already-shipped plan documents (installer, mcp-client).
- **FAQ: data-privacy answer clarified for external LLM providers** (PR
#798) — Sharper guidance on what leaves your machine when you point GAIA
at Claude or OpenAI.

---

## Full Changelog

**21 commits** since v0.17.2:

- `6d3f3f71` — fix: replace misplaced decorative cursor with tracked
terminal block cursor (#727)
- `874cf2a3` — fix: Ask Agent indexes and attaches files before sending
to chat (#725)
- `4fa121e2` — fix: surface document indexing failures instead of silent
0-chunk success (#723)
- `34b1d06e` — fix(ci): ad-hoc sign macOS DMG instead of skipping code
signing (#765)
- `7188b83c` — Roadmap overhaul: milestone-aligned plans with
voice-first P0 and 9 new plan documents (#710)
- `1beddac5` — cpp: support Ollama-compatible /v1 endpoints (#773)
- `cf9ac995` — fix: harden rag index thread safety (#746)
- `1c55c31b` — fix(ci): remove legacy electron apps from publish, single
approval gate (#758)
- `52946a7a` — feat(installer): bundle Lemonade Server MSI into Windows
installer (#774) (#781)
- `e96b3686` — ci(claude): review infra + conventions + subagent
overhaul + agent-builder tooling (#783)
- `058674b5` — fix(rag): detect encrypted and corrupted PDFs with
actionable errors (#451) (#784)
- `7bcb5d51` — fix: replace insecure pickle deserialization with JSON +
HMAC in RAG cache (CWE-502) (#768)
- `a5167e5f` — fix: keep file-search count aligned with accessible
results (#754)
- `da5ba458` — ci(claude): migrate to claude-code-action v1.0.99 + fix
issue-handler hang (#797)
- `03f546b9` — ci(claude): bump pr-review and pr-comment --max-turns 20
-> 50 (#799)
- `4119d564` — docs(faq): clarify data-privacy answer re: external LLM
providers (#798)
- `0cfbcf41` — Add example agents and integration test workflow (#340)
- `c4bd15fb` — docs: fix drift between docs and source (docs review pass
1 + 2) (#794)
- `407ed5b8` — docs(plans): add email triage agent spec (#796)
- `06fb04a4` — fix(mcp): guard JSON-RPC handler against non-dict body
(#803)
- `880ad603` — feat(installer): custom installer guide, agent
export/import, first-launch seeder (#795)

Full Changelog:
[v0.17.2...v0.17.3](v0.17.2...v0.17.3)

---

## Release checklist
- [x] `util/validate_release_notes.py docs/releases/v0.17.3.mdx --tag
v0.17.3` passes
- [x] `src/gaia/version.py` → `0.17.3`
- [x] `src/gaia/apps/webui/package.json` → `0.17.3`
- [x] Navbar label in `docs/docs.json` → `v0.17.3 · Lemonade 10.0.0`
- [x] All 21 PRs in the range (v0.17.2..HEAD) are represented in the
notes
- [ ] Review from @kovtcharov-amd addressed
@kovtcharov kovtcharov mentioned this pull request Apr 26, 2026
26 tasks
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Aug 10, 2026
amd#2878)

`docs/reference/dev.mdx` Step 5 told Linux contributors two opposite
things about `--extra-index-url`: a `<Warning>` saying always use it,
then a code comment and a `<Note>` two paragraphs below saying uv routes
CPU-only PyTorch automatically. Anyone following the "with optional
extras" command — the one you need for `[ui]` or `[rag]` — resolved a
CUDA-linked PyTorch and 18 `nvidia-*`/`cuda-*` packages: a 4.7 GB venv
of CUDA on AMD-only hardware. The flag is now present in every Linux
command, and the `<Note>` explains why it is always required:
`accelerate` is an unconditional base dependency, and
`[tool.uv.sources]` applies only to uv's project interface (`uv
sync`/`uv lock`/`uv add`), never to `uv pip install`.

Closes amd#2877

## Test plan

- [x] Linux/x86_64, resolution-only into a clean throwaway venv: `uv pip
install --dry-run -e .` (no flag) resolves `torch==2.13.0` plus **18**
`nvidia-*`/`cuda-*` packages — full output in the comment below
- [x] Same box: adding `--extra-index-url
https://download.pytorch.org/whl/cpu` resolves `torch==2.13.0+cpu` with
**zero** CUDA packages
- [x] `git diff --stat` touches only `docs/reference/dev.mdx`
- [x] The Windows commands are unchanged (they correctly omit the flag)
- [x] The `<Warning>` and the `<Note>` in Step 5 now state the same rule

<details>
<summary>Why the old <code>&lt;Note&gt;</code> was wrong, and how it got
there</summary>

`[tool.uv.sources]` is a **project-interface** feature — `uv sync`, `uv
lock`, `uv add`. uv's documentation states that project-interface
settings have "no effect on the uv pip interface", which is configured
separately under `[tool.uv.pip]`. Every install command in GAIA's docs
is `uv pip install`, so the routing never applied.

Two further errors in the old note:

- it named a key that does not exist — `tool.uv.sources.pytorch-cpu`,
where `pytorch-cpu` is the *index* name in `[[tool.uv.index]]`
(`pyproject.toml:61-64`); the actual `sources` keys are
`torch`/`torchvision`/`torchaudio` (`:66-69`);
- `pyproject.toml` has no `[project]` table, so uv's project interface
is not usable on this repo at all — the sources block cannot fire via
any command the docs use.

Both the note and the flagless extras command were introduced by amd#794
("docs: fix drift between docs and source").

Not changed, because they were already correct:
`docs/quickstart.mdx:264,412`, `docs/guides/talk.mdx:38`,
`installer/scripts/install.sh:210,244`,
`src/gaia/apps/webui/services/backend-installer.cjs:1462`.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audio Audio (ASR/TTS) changes chat Chat SDK changes devops DevOps/infrastructure changes documentation Documentation changes llm LLM backend changes performance Performance-critical changes rag RAG system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants