Skip to main content

fastllm-claude-code

This FastLLM provider runs models through an authenticated Claude Code CLI using fastclaude. Ordinary streaming and non-streaming FastLLM calls work as with any provider, and so do client-owned tool loops: FastLLM replays canonical history after each tool round, and fastclaude continues it in a fresh process.

Usage

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/AnswerDotAI/fastllm-claude-code.git

or from conda

$ conda install -c AnswerDotAI fastllm_claude_code

or from pypi

$ pip install fastllm_claude_code

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.

How to use

Installing the package registers the claude_code transport through FastLLM’s provider entry point. The Claude CLI must already be installed and authenticated for the current user.

A normal FastLLM call uses the provider prefix:

from fastllm.acomplete import acomplete

answer = await acomplete('Answer briefly: what is 2+2?', model='claude_code/claude-sonnet-5')

For a client-owned tool loop, pass standard Responses API or Chat Completions function schemas. A response containing tool calls ends the turn; execute them and call again with the history extended by their results, as with any completions provider. fastclaude continues that history in a fresh process, so no response id is issued and nothing is held between calls:

first = await acomplete(messages, model='claude_code/claude-sonnet-5', tools=tools)
assert first.tool_calls and first.response_id is None

final = await acomplete(messages_with_results, model='claude_code/claude-sonnet-5', tools=tools)

Set stream=True for FastLLM’s normalized async stream. Non-streaming calls collect the same stream into one Completion. The adapter returns tool requests but never executes them.

Release files for fastllm-claude-code 0.0.14

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

Source distribution (sdist)

Source distribution for fastllm-claude-code 0.0.14
File Size Uploaded
fastllm_claude_code-0.0.14.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastllm-claude-code 0.0.14
File Interpreter ABI Platform
fastllm_claude_code-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / fastllm_claude_code-0.0.14.tar.gz

Download URL fastllm_claude_code-0.0.14.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
607885085893c31bc134c7c5a60b69fca6a031a76a616f5983bcb447cf9592f3
BLAKE2b-256 checksum
How to use checksums
6d24da4b425655200a1b83da4436f80b31136b1b83522c6eed3775622d77d15f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / fastllm_claude_code-0.0.14-py3-none-any.whl

Download URL fastllm_claude_code-0.0.14-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5841fdc25dc929076d7824a1b2d6b90f200558ebabb74a95a92dd81e4809b946
BLAKE2b-256 checksum
How to use checksums
03da355fcdfffc05d77b3af031e158108bb86d6ad3f7f7f236eab807cf2d0887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.0.16

2 release files

This release

0.0.14 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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