Skip to main content

weftai-providers

Present a weftai runtime as a tool on a model host. weftai never calls a model itself: each adapter turns one bound plan tool into the tool definition a host documents, and turns the host's tool calls back into plans. Your application keeps its own SDK or HTTP client.

pip install weftai-providers
pip install "weftai-providers[anthropic]"   # adds the Anthropic SDK, for its tool runner
from weftai.providers.openai import PRESETS, openai_tools

tools = openai_tools(
    runtime,
    {
        **PRESETS["qwenIntl"],
        "model": "qwen-plus",
        "ctx": ctx,
        "tools": [{"name": "query_tickets", "include": lambda op: op.effects == "read"}],
    },
)

Families

Each family is its own module, so an application imports only the ones it uses.

Import Host
weftai.providers.openai OpenAI Chat Completions and Responses, Azure OpenAI, and OpenAI-compatible hosts through PRESETS
weftai.providers.anthropic Anthropic Messages tools, and the SDK's tool runner with the anthropic extra
weftai.providers.google Gemini generateContent and Interactions
weftai.providers.bedrock Amazon Bedrock Converse
weftai.providers.ollama Ollama's native /api/chat
weftai.providers.cohere Cohere Chat v2
weftai.providers.dashscope Alibaba DashScope Generation and MultiModalConversation
weftai.providers.hunyuan Tencent Cloud Hunyuan
weftai.providers.spark iFlytek Spark (WebSocket)
weftai.providers.ai_sdk The Vercel AI SDK's tool() shape
weftai.providers.laya A decision service over HTTP, for weftai's decisions interface (below)

PRESETS holds the base URL and settings of hosted, local and regional OpenAI-compatible hosts, so a preset plus a model name is a complete configuration. The capability catalog checks known model and API combinations, and names an explicit override when a model is unknown.

Decisions over HTTP

weftai's decisions interface asks a Decider short, typed questions (a choice, a score, a yes or no) and gets back answers with probabilities. LayaDecider is one implementation, for a decision service reached over HTTP: you supply its endpoint and an httpx.AsyncClient, which you own. Failures and timeouts abstain rather than guess, and what a host does with an answer, including any permission, stays the host's decision.

License

MIT

Metadata

Release files for weftai-providers 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weftai-providers 0.5.2
File Size Uploaded Provenance Actions
weftai_providers-0.5.2.tar.gz 28.9 kB With provenance Details for weftai_providers-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for weftai-providers 0.5.2
File Interpreter ABI Platform Actions
weftai_providers-0.5.2-py3-none-any.whl Python 3 none any Details for weftai_providers-0.5.2-py3-none-any.whl

Total release size: 58.9 kB

Release files / weftai_providers-0.5.2.tar.gz

Download URL weftai_providers-0.5.2.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
77908ef3d5c472331ea8c8179e4f6f21117b32b5004c1627a18f5c380250a47b
BLAKE2b-256 checksum
How to use checksums
b91327d34bff3b4e71211e41efcb6349a70b5812503dfd3805b0ccc15ec496f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / weftai_providers-0.5.2-py3-none-any.whl

Download URL weftai_providers-0.5.2-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a1bbaa86d01010574c090350f3013948704b69152659c0657661946210de7b5
BLAKE2b-256 checksum
How to use checksums
0130723e1c260a5644211993549aadbafd7a6b85fc03bdb9efc9fdfd94194b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Security for weftai-providers 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for weftai_providers-0.5.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page