AGENTS.md 1.3 KB

AGENTS.md — Model Selector

Purpose

This repo hosts a FastAPI dashboard for browsing and editing the model/provider configuration in ~/.openclaw/openclaw.json.

Non-negotiables

  • Treat /home/lucky/.openclaw/openclaw.json as the canonical source.
  • Never edit the live file in tests. Copy it to a temp path and point the app there.
  • Preserve unrelated config sections exactly in behavior and key structure.
  • Keep alias edits in agents.defaults.models.<provider/model>.alias.
  • Run the app on port 3300.

Working rules

  • Read the current JSON shape before changing schema-sensitive code.
  • Use atomic writes for config saves.
  • Keep provider refresh snapshots local as JSON cache files.
  • Prefer explicit provider/model adapters over implicit magic.
  • If a capability is not present in provider metadata, show it as missing instead of inventing it.
  • Use ./run.sh to start the app, ./killserver.sh to clear stale listeners on port 3300, and ./restart.sh to do both in sequence.

Tests

  • Use a copied config fixture for all persistence tests.
  • Verify that saving aliases does not change the original source file.
  • Verify provider cache snapshots are written to local JSON files.
  • Verify the dashboard renders both the configured model panel and the provider tabs.