Skip to content

Commit 3f825b2

Browse files
llm: group providers under llm/providers/ subpackage
Mirrors the openarmature.graph.middleware shape so the package layout signals where future providers (Anthropic, Bedrock, gateway-shaped) will live. Public surface is unchanged — `from openarmature.llm import OpenAIProvider` still works via the package-root re-export.
1 parent 0513bc3 commit 3f825b2

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

src/openarmature/llm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
ToolMessage,
4747
UserMessage,
4848
)
49-
from .openai import OpenAIProvider
5049
from .provider import Provider, validate_message_list, validate_tools
50+
from .providers import OpenAIProvider
5151
from .response import FinishReason, Response, RuntimeConfig, Usage
5252

5353
__all__ = [
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Concrete provider implementations.
2+
3+
Each provider talks to a specific LLM backend's wire format and
4+
satisfies the :class:`openarmature.llm.Provider` Protocol. The current
5+
catalog ships :class:`OpenAIProvider` (OpenAI Chat Completions wire
6+
format — also covers vLLM, LM Studio, llama.cpp). Anthropic / Bedrock /
7+
gateway-shaped providers will land here in later phases.
8+
9+
Users typically import from the package root::
10+
11+
from openarmature.llm import OpenAIProvider
12+
13+
This subpackage exists to keep the provider catalog grouped and to
14+
mirror the ``openarmature.graph.middleware`` layout.
15+
"""
16+
17+
from .openai import OpenAIProvider
18+
19+
__all__ = ["OpenAIProvider"]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import httpx
4545
from pydantic import ValidationError
4646

47-
from .errors import (
47+
from ..errors import (
4848
ProviderAuthentication,
4949
ProviderInvalidModel,
5050
ProviderInvalidRequest,
@@ -53,16 +53,16 @@
5353
ProviderRateLimit,
5454
ProviderUnavailable,
5555
)
56-
from .messages import (
56+
from ..messages import (
5757
AssistantMessage,
5858
Message,
5959
SystemMessage,
6060
Tool,
6161
ToolCall,
6262
UserMessage,
6363
)
64-
from .provider import validate_message_list, validate_tools
65-
from .response import FinishReason, Response, RuntimeConfig, Usage
64+
from ..provider import validate_message_list, validate_tools
65+
from ..response import FinishReason, Response, RuntimeConfig, Usage
6666

6767

6868
class OpenAIProvider:

0 commit comments

Comments
 (0)