consciousness/src
Kent Overstreet 3e05331608 config: merge ModelConfig into BackendConfig, keyed by name
AppConfig had one BackendConfig for credentials and a separate
HashMap<String, ModelConfig> for named model entries. In practice each
named model was always paired with exactly one backend's credentials
— the split bought nothing except an extra struct and the awkward
two-lookup shape in resolve_model (find model → get backend creds →
combine).

Merge them: BackendConfig now carries api_key, base_url, model_id,
and context_window. AppConfig has a single
HashMap<String, BackendConfig> backends map and a default_backend
name. resolve_model is one lookup.

ModelConfig struct deleted. default_model renamed to default_backend.
Config shape changes from

    backend: { api_key, base_url }
    models: { "27b": { model_id, context_window } }
    default_model: "27b"

to

    backends: { "27b": { api_key, base_url, model_id, context_window } }
    default_backend: "27b"

Updated ~/.consciousness/config.json5 to match.

One small side effect: dropped the --api-key / --api-base figment
merge-opts for "backend.*" targets — those would need to know which
backend to target now and there's no sensible default. The CLI flags
still function as post-resolution overrides on the eventual
SessionConfig.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-16 15:49:53 -04:00
..
agent config: drop dead code and collapse to a single backend 2026-04-16 15:41:55 -04:00
bin context: tighten timestamp schema; every AstNode has one 2026-04-16 12:35:16 -04:00
cli Simplify context config: personality_nodes and agent_nodes 2026-04-15 02:37:49 -04:00
hippocampus store: add weight to index, index-only key matching 2026-04-15 05:14:04 -04:00
learn rust edition 2024 2026-04-05 06:20:16 -04:00
mind config: drop dead code and collapse to a single backend 2026-04-16 15:41:55 -04:00
subconscious agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
thalamus hours_since_last_dream: return 0 if dream in progress 2026-04-15 21:58:03 -04:00
user config: drop dead code and collapse to a single backend 2026-04-16 15:41:55 -04:00
config.rs config: merge ModelConfig into BackendConfig, keyed by name 2026-04-16 15:49:53 -04:00
config_writer.rs config_writer: emit pretty multi-line sections, drop json5 crate 2026-04-16 13:08:19 -04:00
lib.rs config_writer: json5 round-trip editing via json-five 2026-04-16 11:48:47 -04:00
locks.rs locks: add process-wide lock hold time tracking 2026-04-12 20:27:42 -04:00
main.rs cli: add 'node restore' command for undeleting nodes 2026-04-15 01:40:29 -04:00
mcp_server.rs memory.rs: clean up store access and tool dispatch 2026-04-13 14:27:38 -04:00
session.rs delete claude code integration 2026-04-09 19:58:07 -04:00
util.rs delete 20 dead public functions across 12 files 2026-04-02 16:21:01 -04:00