Providers yield unified OpenAI-shaped chunks: OpenAI/Ollama stream natively,
Anthropic events are normalized, and other providers get an async bridge over
any sync stream. Streaming is manual tool calling only (no max_turns/MCP).
Lint / build_and_test (3.10) (push) Has been cancelled
Lint / build_and_test (3.11) (push) Has been cancelled
Lint / build_and_test (3.12) (push) Has been cancelled
The async client replicated the manual tool-calling regression fixed in
#266: acreate() pops `tools` from kwargs and never handed them to the
provider when max_turns is absent. Both create() and acreate() now share
a _provider_ready_tools() helper (schema dicts pass through, callables
become OpenAI-format specs) and an async regression test mirrors the
sync one.
Add Completions.acreate and an async _atool_runner that await the provider's
achat_completions_create and the async tool execution. Provider resolution,
tool-runner setup, model-event emission, and response finalization are factored
into shared helpers so the sync create/_tool_runner and the async paths stay in
lockstep instead of duplicating the tool loop. MCP client cleanup remains
synchronous via ExitStack.
Avoid sharing the default provider config mapping across Client instances and copy caller-provided provider configs before storing or passing them into provider initialization.
Mechanical 'black .' over root package and platform/ (109 files; the
Lint workflow checks the whole repo and has been red since platform
landed unformatted, with a few more violations from community merges
whose branches never ran CI). No functional change: full platform
suite (264) and aisuite suites verified unchanged after formatting.
The Ollama and LM Studio providers hit the native endpoints and normalized
only `message.content`, silently dropping tool_calls, finish_reason, and
usage — so tool calling never worked on local models.
Drive both through the providers' OpenAI-compatible /v1 endpoint by
subclassing OpenaiProvider, so tool calls, tool-result messages, and
finish_reason flow through the OpenAI SDK unchanged.
- OllamaProvider / LmstudioProvider: subclass OpenaiProvider and point
base_url at the local /v1 endpoint (host overridable via api_url config or
OLLAMA_API_URL / LMSTUDIO_API_URL), with a dummy api_key the servers ignore
- pyproject: the ollama and lmstudio extras now require the openai SDK
- tests: rewrite the provider tests to the OpenAI-SDK mock pattern with
explicit tool-call coverage, plus a client tool-loop test for ollama:
- fix the auto-mode test: it patched client.chat.completions._client,
an attribute that does not exist (Completions has .client), which
made patch.object raise before asserting anything
- new test: manual mode with callable tools must hand the provider
OpenAI-format specs (callables cannot be serialized into a request)
- point the regression reference at PR #266 instead of a placeholder
Introduce a high-level Agent abstraction for aisuite. An Agent pairs a
model with instructions, tools, and run settings, and a Runner drives
the multi-step tool-calling loop over any aisuite-supported provider.
- aisuite/agents: Runner (run_sync / continue_sync) plus typed
Agent, RunResult, RunState, and RunStep
- Tool policies (ToolPolicyContext / ToolPolicyDecision) to gate
which tools a run may invoke
- Continuation API to resume a finished run with new input
- aisuite/utils/tools: tool schema generation and execution helpers
- examples/agents/simple_agent.py: minimal end-to-end example
- tests/agents: runner, tool-policy, continuation, and OpenAI
integration coverage
Co-authored-by: Rohit <rohit.prasad15@gmail.com>
Summary:
HF supports many models which can be used for transcription.
Add support for all models that can be accessed via the HF Inference API.
Examples - openai/whisper-* family, facebook/wav2vec2-* family, and many others.
Updated README, Added Test cases (unit + integration) for the same.
Summary of test cases
Core parameter pass-through functionality is fully tested and validated
through unit tests and client integration tests.
test_asr_params.py - ParamValidator logic, mappings, transformations.
test_client.py - Client-level validation, all modes, parameter flow
test_asr_parameter_passthrough.py - OpenAI & Google.
Deepgram mock test will need more work due to dynamic imports used
in the SDK, hence not included in this commit.
This will be invoked by the GitHub workflow
each time a release is cut. This is part of
the pre-work for creating release automation.
Ignore the integration test using mark.
* Convention based loading of Provider modules.
Loads the Provider class based on below
convention.
Eg:
For "aws:model-name",
1) look for providers/aws_provider.py
2) load AwsProvider class from above file.
This allows convention based addition of
new providers.
Support for Fireworks provider using http.
Fixed few things based on the doc.
Support for Together using http requests.
Removing interface.py files
---------
Co-authored-by: Kevin Solorio <103829+ksolo@users.noreply.github.com>
Added Azure support & refactored code.
Refactoring includes -
- ProviderFactory
- Lazily import the provider based on config passed to Client.
Will need to port the older provider files
to the new format. Till then keeping the
older provider interface related tests.
Co-authored-by: rohit-rptless <rohit@repeatless.cloud>