Metadata-Version: 2.5
Name: weftai-providers
Version: 0.4.0
Summary: Weftai provider families: OpenAI, Anthropic, Gemini, Bedrock, Ollama, Chinese hosts
Author: Rex Technologies
License-Expression: MIT
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27
Requires-Dist: weftai==0.4.0
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.49; extra == 'anthropic'
Description-Content-Type: text/markdown

# weftai-providers

Provider tool adapters for Weftai. Install with `pip install weftai-providers`.

Adapters turn a bound Weftai tool into the tool-definition and tool-result shapes expected by a
model host; they do not make provider HTTP requests or choose a model on your behalf.

| Module | Tool surface |
| --- | --- |
| `openai` | Chat Completions, Responses, legacy functions, Assistants/Realtime helpers, Azure, and OpenAI-compatible presets |
| `anthropic` | Messages tools and the optional Anthropic tool runner |
| `google` | Gemini `generateContent` and Interactions |
| `bedrock` | Amazon Bedrock Converse |
| `ollama` | Native `/api/chat` |
| `cohere` | Cohere Chat v2 |
| `dashscope` | Native DashScope Generation and MultiModalConversation |
| `hunyuan` | Tencent Cloud Hunyuan ChatCompletions |
| `spark` | Classic iFlytek Spark WebSocket tools |
| `ai_sdk` | Vercel AI SDK `tool()` shape |

`weftai.providers.openai.PRESETS` covers the current OpenAI-shaped hosted, local, and regional
hosts. The capability catalog validates known model/API combinations and points callers to an
explicit API override when a model is unknown.

See the [provider guide](https://github.com/tochi-mba/weftai-python/blob/main/docs/providers.md)
and run `uv run --package weftai-example-chat python -m chat_examples.openai` from a clone for a
small OpenAI wire-shape example.

## Laya decisions

The Laya adapter implements the shared Decider interface for a long-running HTTP service. Python: `from weftai.providers.laya import LayaDecider`; npm: `import { LayaDecider } from "@weftai/providers/laya"`. Supply an operator-owned endpoint, and an `httpx.AsyncClient` in Python. Failures abstain; permissions remain the host's responsibility.
