300e33980a
Move providers.py + profiles.py from cmd_chat/agent/ to a shared
cmd_chat/ai/ package so the operator bridge and the /ai chat agent can
consume one model-agnostic Provider core (groundwork for harness-mode
operators). Pure refactor — no behaviour change.
- cmd_chat/ai/{providers,profiles}.py: the canonical modules (moved verbatim)
- cmd_chat/ai/__init__.py: re-exports the public API
- cmd_chat/agent/{providers,profiles}.py: thin back-compat shims re-exporting
from cmd_chat.ai (keeps `from cmd_chat.agent.providers import …` working,
e.g. hh/scripts/bench-native-harness.py)
- internal agent consumers (memory/bridge/__main__/__init__) point at cmd_chat.ai
125 tests pass; shim identity verified (re-exports are the same objects).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
916 B
Python
38 lines
916 B
Python
"""Shared model-agnostic AI core for hack-house.
|
|
|
|
Houses the provider abstraction (``providers``) and named model profiles
|
|
(``profiles``) consumed by BOTH the in-room ``/ai`` chat agent and the operator
|
|
bridge. Hoisted here from ``cmd_chat.agent`` so the operator can run any
|
|
function-calling model as an operator, not just Claude. The old
|
|
``cmd_chat.agent.{providers,profiles}`` paths remain as thin re-export shims for
|
|
backward compatibility.
|
|
"""
|
|
|
|
from .providers import (
|
|
Msg,
|
|
OllamaEmbedder,
|
|
OllamaProvider,
|
|
Provider,
|
|
ToolsUnsupported,
|
|
make_provider,
|
|
preflight,
|
|
)
|
|
from .profiles import (
|
|
find_profiles_file,
|
|
load_profiles,
|
|
provider_from_profile,
|
|
)
|
|
|
|
__all__ = [
|
|
"Msg",
|
|
"Provider",
|
|
"ToolsUnsupported",
|
|
"OllamaProvider",
|
|
"OllamaEmbedder",
|
|
"make_provider",
|
|
"preflight",
|
|
"load_profiles",
|
|
"find_profiles_file",
|
|
"provider_from_profile",
|
|
]
|