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/deepseek/__init__.py
4
5"""
6DeepSeek provider bundle.
7
8Purpose
9-------
10Importing this package registers :class:`DeepSeekProvider` into the
11module-level registry at ``oc_chat.core.provider_plugin.registry``.
12The rest of the app then retrieves it via ``registry.get("deepseek")``.
13
14Responsibilities
15----------------
16- Self-register :class:`DeepSeekProvider` on import (Phase C.1c
17 contract).
18- Re-export :class:`DeepSeekProvider` for direct access.
19
20Diagnostics
21-----------
22Domain: OC_CHAT.CLIENT
23Levels:
24 L2 — lifecycle events
25 L3 — semantic details
26 L4 — deep tracing
27
28Contracts
29---------
30- Side effect on import: ``DeepSeekProvider.register()`` runs once.
31 Repeated imports are idempotent (the registry detects same-name +
32 same-class registrations and skips silently).
33- ``__all__`` deliberately exposes only the provider class — bundle
34 internals (``client``, ``models``, ``cache_usage``) are private to
35 the bundle.
36
37Dependencies
38------------
39- oc_diagnostics (structured debug logging via _dbg)
40- providers.deepseek.provider (DeepSeekProvider, registered on import and re-exported)
41"""
42from oc_diagnostics import _dbg
43
44from .provider import DeepSeekProvider
45
46# Self-register on import (Phase C.1c contract).
47DeepSeekProvider.register()
48
49_dbg("OC_CHAT.CLIENT", "module", "loaded", 4)
50
51__all__ = ["DeepSeekProvider"]