Skip to content

[codex] Support local hardware profile overlays - #3

Merged
GuideboardLabs merged 1 commit into
GuideboardLabs:mainfrom
Ozhiaki:codex/local-hardware-profile-overlays
May 15, 2026
Merged

[codex] Support local hardware profile overlays#3
GuideboardLabs merged 1 commit into
GuideboardLabs:mainfrom
Ozhiaki:codex/local-hardware-profile-overlays

Conversation

@TheEditor

@TheEditor TheEditor commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a local hardware profile overlay layer. Oathweaver can now load host-specific profile definitions from SourceCode/configs/hardware_profiles.local.json and merge them over the shared hardware profile config at startup.

This preserves the project’s shared runtime defaults while giving operators a documented path for local capacity tuning that does not require editing tracked config files.

Why

The active hardware profile layer introduced in PR #2 makes runtime capacity explicit through shared config. That is useful for portable defaults, but individual deployments still need a place for machine-specific profile values, local defaults, and temporary tuning.

This PR adds that local-only layer so future users can describe deployment-specific capacity without carrying dirty changes in SourceCode/configs/hardware_profiles.json or proposing machine-specific profiles upstream.

Changes

  • Adds optional local profile loading from SourceCode/configs/hardware_profiles.local.json.
  • Merges local profile definitions over the shared profile payload when present.
  • Allows the local overlay to override default_profile for a deployment.
  • Ignores SourceCode/configs/*.local.json so local profile overlays stay out of source control.
  • Documents the local hardware profile workflow in the README.
  • Updates the Linux web launcher so --no-restart-ollama reuses the configured Ollama endpoint instead of starting another ollama serve process.
  • Adds tests for adding local profile definitions and overriding the active default through the local overlay.

Example Profile Shape

{
  "default_profile": "local_8gb_vram_48gb_ram_cuda",
  "profiles": {
    "local_8gb_vram_48gb_ram_cuda": {
      "name": "local_8gb_vram_48gb_ram_cuda",
      "display_name": "Local: 48GB RAM / 8GB CUDA",
      "hardware": {
        "system_ram_gb": 48,
        "gpu_backend": "cuda",
        "gpu_vram_gb": 8,
        "unified_memory": false
      },
      "scheduler": {
        "max_context_tokens": 12288,
        "warning_context_tokens": 8192,
        "max_stage_context_tokens": 2400,
        "max_parallel_models": 1,
        "max_active_model_calls": 1,
        "on_deck_depth": 1,
        "warm_depth": 0,
        "allow_neural_prefetch": false
      }
    }
  }
}

Validation

  • PYTHONPATH=SourceCode python3 -m unittest tests.test_hardware_profiles tests.test_inference_router_compat tests.test_model_routing_tier_resolution tests.test_ollama_wait_for_available
  • PYTHONPATH=SourceCode .venv/bin/python -m unittest tests.test_hardware_profiles
  • python3 -m json.tool SourceCode/configs/hardware_profiles.json >/dev/null
  • python3 -m json.tool SourceCode/configs/hardware_profiles.local.json >/dev/null
  • bash -n start_oathweaver_web.sh
  • git diff --check

@GuideboardLabs
GuideboardLabs marked this pull request as ready for review May 15, 2026 12:33
@GuideboardLabs
GuideboardLabs merged commit 155a727 into GuideboardLabs:main May 15, 2026
0 of 2 checks passed
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