Skip to content

bug: gbrain config show hides embedding_model / embedding_dimensions / expansion_model / chat_model keys #671

@mochafreddo

Description

@mochafreddo

Summary

gbrain config show displays only engine and database_url, hiding embedding_model, embedding_dimensions, expansion_model, chat_model, and any other GBrainConfig keys. The values are persisted (gbrain config get embedding_model returns them, schema/gateway/probe wiring all read them) — only the display is filtered.

Repro on v0.27.0

$ gbrain config set embedding_model ollama:nomic-embed-text
Set embedding_model = ollama:nomic-embed-text
$ gbrain config set embedding_dimensions 768
Set embedding_dimensions = 768

$ gbrain config show
GBrain config:
  engine: postgres
  database_url: postgresql://gbrain:***@127.0.0.1:63131/brain
# (no mention of embedding_model / embedding_dimensions, which are present in config.json on disk)

$ gbrain config get embedding_model
ollama:nomic-embed-text
$ gbrain config get embedding_dimensions
768

$ cat ~/.gbrain/config.json
{
  "engine": "postgres",
  "database_url": "postgresql://...",
  "embedding_model": "ollama:nomic-embed-text",
  "embedding_dimensions": 768
}

config show is the obvious "is my brain configured the way I expect?" surface for users debugging embedding setup. Hiding these keys cost me ~30 minutes when chasing a dim-mismatch issue (#OTHER) — I could see provider list show ollama as ready and provider test succeed, but couldn't easily confirm what config.json actually had without inspecting the raw file.

Suggested fix

config show should iterate the full GBrainConfig shape and either:

  1. Print every populated key (with secrets masked the same way database_url already is); or
  2. Add a --json / --all flag that includes them.

Masking is already in place for database_url; same approach for openai_api_key if it sneaks in.

Environment

  • gbrain 0.27.0 (dev checkout at ~/gbrain/)
  • Postgres engine via pgvector/pgvector:pg17
  • macOS 25.4.0 / Apple M4 Pro / Bun 1.3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions