oc_chat
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# providers/__init__.py
4
5"""
6Provider plugin bundles for OC Chat.
7
8Purpose
9-------
10Each subdirectory is a self-contained provider implementation.
11Importing a subpackage (e.g. ``import providers.deepseek``) triggers
12self-registration into ``oc_chat.core.provider_plugin.registry``.
13The active provider is selected at startup by the
14``OC_CHAT_PROVIDER`` env var (default ``"deepseek"``) and looked up
15in that registry.
16
17Responsibilities
18----------------
19- Mark ``providers/`` as a Python package.
20- Hold provider bundles: ``deepseek`` (production) and ``example``
21 (deterministic stub for templates and tests).
22
23See ``providers/README.md`` (added in Phase C.5) for the canonical
24bundle layout.
25
26Diagnostics
27-----------
28Domain: OC_CHAT.CLIENT
29Levels:
30 L2 — lifecycle events
31 L3 — semantic details
32 L4 — deep tracing
33
34Contracts
35---------
36- Module-level L4 ``_dbg`` is a diagnostics-coverage marker; it
37 emits nothing at default verbosity (domain default is L2).
38- Subpackages self-register on import — never import here, only at
39 the call site that needs the provider active.
40
41Dependencies
42------------
43- oc_diagnostics (structured debug logging via _dbg)
44"""
45
46from oc_diagnostics import _dbg
47
48_dbg("OC_CHAT.CLIENT", "module", "loaded", 4)