mirror of
https://github.com/Alishahryar1/free-claude-code.git
synced 2026-07-03 14:05:26 +02:00
fa01c2a3a6
## Summary - move provider transport families under `providers/transports/` - split OpenAI-chat transport into thin transport, stream runner, tool-call assembly, and recovery modules - split native Anthropic transport into thin transport, stream runner, recovery, and HTTP helper modules - update concrete provider imports, architecture docs, transport import contracts, version, and lockfile ## Verification - `uv run pytest tests/providers/test_streaming_errors.py tests/providers/test_openai_compat_5xx_retry.py tests/providers/test_anthropic_messages.py tests/providers/test_anthropic_messages_429_retry.py tests/providers/test_provider_transport_logging.py tests/providers/test_gemini.py tests/providers/test_nvidia_nim_request.py tests/providers/test_subagent_interception.py tests/contracts/test_import_boundaries.py` - `uv run ruff format` - `./scripts/ci.ps1`
17 lines
536 B
Python
17 lines
536 B
Python
"""Llama.cpp provider implementation."""
|
|
|
|
from providers.base import ProviderConfig
|
|
from providers.defaults import LLAMACPP_DEFAULT_BASE
|
|
from providers.transports.anthropic_messages import AnthropicMessagesTransport
|
|
|
|
|
|
class LlamaCppProvider(AnthropicMessagesTransport):
|
|
"""Llama.cpp provider using native Anthropic Messages endpoint."""
|
|
|
|
def __init__(self, config: ProviderConfig):
|
|
super().__init__(
|
|
config,
|
|
provider_name="LLAMACPP",
|
|
default_base_url=LLAMACPP_DEFAULT_BASE,
|
|
)
|