BindAI Providers
bindai-providers provides the provider infrastructure used by BindAI to configure, construct, register, and bootstrap model providers.
The package builds on the provider contracts defined by bindai-core and provides higher-level provider management through ProviderBuilder, ProviderRegistry, and bootstrap.
Features
- Model provider infrastructure
- Provider configuration
- Provider capabilities
- Provider factories
- Provider registry
- Provider builder
- Provider bootstrap
- Model request and response contracts
- Streaming response support
- Token usage information
Provider implementations are maintained separately from this package.
Public API
The package exposes the following provider contracts and utilities:
from bindai_providers import (
ModelProvider,
ModelRequest,
ModelResponse,
ProviderCapabilities,
ProviderConfiguration,
ProviderFactory,
ProviderRegistry,
StreamChunk,
TokenUsage,
ProviderBuilder,
bootstrap,
)
ModelProvider
The ModelProvider contract represents a model provider capable of processing BindAI model requests.
from bindai_providers import ModelProvider
Provider implementations can conform to this abstraction without requiring BindAI applications to depend directly on a specific provider implementation.
ModelRequest
ModelRequest represents a request sent to a model provider.
from bindai_providers import ModelRequest
ModelResponse
ModelResponse represents a provider response.
from bindai_providers import ModelResponse
ProviderCapabilities
ProviderCapabilities describes the capabilities supported by a provider.
from bindai_providers import ProviderCapabilities
ProviderConfiguration
ProviderConfiguration represents provider configuration information.
from bindai_providers import ProviderConfiguration
ProviderFactory
ProviderFactory provides the factory abstraction used to construct providers.
from bindai_providers import ProviderFactory
ProviderRegistry
ProviderRegistry manages registered providers.
from bindai_providers import ProviderRegistry
ProviderBuilder
ProviderBuilder provides a higher-level interface for configuring and constructing providers.
from bindai_providers import ProviderBuilder
StreamChunk
StreamChunk represents an incremental streaming response from a provider.
from bindai_providers import StreamChunk
TokenUsage
TokenUsage represents token usage information associated with a model request.
from bindai_providers import TokenUsage
bootstrap
bootstrap initializes the provider infrastructure.
from bindai_providers import bootstrap
bootstrap()
Provider Architecture
The provider package sits between BindAI's core provider contracts and concrete provider implementations:
BindAI Application
│
▼
ProviderBuilder
│
▼
ProviderRegistry
│
▼
ProviderFactory
│
▼
ModelProvider
│
┌─────────────┼─────────────┐
▼ ▼ ▼
OpenAI Anthropic Google
Provider Provider Provider
Concrete providers remain separate packages. This allows the core provider infrastructure to remain independent from individual model vendors.
Requests and Responses
BindAI provider interactions use shared contracts:
ModelRequest
│
▼
ModelProvider
│
├── ModelResponse
│
└── StreamChunk
│
▼
TokenUsage
This provides a consistent interface for synchronous and streaming model interactions.
Provider Registration
Providers can be managed through ProviderRegistry:
from bindai_providers import ProviderRegistry
registry = ProviderRegistry()
The registry provides the central provider lookup mechanism used by the provider infrastructure.
Provider Construction
ProviderBuilder provides a higher-level construction API:
from bindai_providers import ProviderBuilder
builder = ProviderBuilder()
The builder is intended to keep provider configuration and construction separate from application code.
Development
From the BindAI repository root:
uv sync
Run the complete test suite:
uv run pytest
Run type checking:
uv run mypy packages/bindai-providers
Build the package:
uv build --package bindai-providers
Package Structure
bindai-providers/
├── pyproject.toml
├── README.md
└── src/
└── bindai_providers/
├── __init__.py
├── bootstrap.py
├── builder.py
└── registry.py
Provider Implementations
Concrete provider packages are maintained independently, including integrations for supported model providers.
This package intentionally focuses on shared provider infrastructure rather than vendor-specific API implementations.
Documentation
Full BindAI documentation is available at:
License
BindAI is released under the MIT License.
Release files for bindai-providers 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bindai_providers-0.1.1.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bindai_providers-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / bindai_providers-0.1.1.tar.gz
| Download URL | bindai_providers-0.1.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
018787daf0d3ee1db3176dc8998963a238c3cb35d6659ba071523ef826739b20
|
|
BLAKE2b-256 checksum How to use checksums |
5720ea143d0754bf0aa06194b7639cbaaa867963c285de95958d8291d081033b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / bindai_providers-0.1.1-py3-none-any.whl
| Download URL | bindai_providers-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
359761de2138f96868ab3c5b2bae912aa7369a8e1280f981e63b2ce7ba70ac2c
|
|
BLAKE2b-256 checksum How to use checksums |
b838396ec4c22a65677821720ee6859ba956c1c6fd0f5e34b0471fba15275ff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|