--- id: fhlmi version: "1.0.5" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # fhlmi — A client to provide LLM responses for FutureHouse applications. License: permissive · Maintenance: active · Downloads: 174.0K/mo ## What it is and what it does fhlmi is a Python library that abstracts away the differences between multiple large language model providers, letting you write code once and swap providers without changing your application logic. It wraps providers under a common async interface, exposing methods like `call_single()` and `call()` that accept text or structured messages. The library handles several operational concerns automatically: it tracks token usage and cost per request, enforces rate limits (tokens per minute and requests per minute) with in-memory or Redis-backed storage, retries failed requests, and supports tool calling and structured output schemas. You configure providers and limits through a config dictionary, then call the LLM through the unified interface—no need to learn each provider's API separately. Use it for: - Build a multi-provider LLM application where you can switch between providers by changing config without rewriting code. - Enforce rate limits across concurrent requests to avoid hitting provider quotas or incurring unexpected costs. - Track token usage and cost per LLM call to monitor spending and optimize prompt efficiency. - Implement tool calling against multiple LLM providers using a single abstraction. - Embed LLM capabilities in async Python services that need retries, timeouts, and cross-process rate limiting. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. fhlmi provides a unified async Python interface to multiple large language models, handling authentication, rate limiting, cost tracking, and tool calling across different LLM providers. Yes, if you need a unified interface to multiple LLM providers with built-in rate limiting and cost tracking. The library is actively maintained, has low install friction, and is permissively licensed. However, verify that all runtime dependencies fit your environment before committing; the dependency footprint is substantial. ## Install pip install fhlmi uv add fhlmi poetry add fhlmi ## Installing fhlmi Before you install: Low friction install with a pure Python wheel. Active maintenance (last commit 2026-08-12, 10 days since release) and 139 repository stars suggest ongoing development. Requires Python 3.11 or later. License in practice: Apache License 2.0 is permissive: you can use, modify, and distribute fhlmi freely in commercial and private projects, provided you include a copy of the license and document any changes you make. Quickstart: pip install fhlmi from fhlmi import LiteLLMModel llm = LiteLLMModel() result = await llm.call_single("What is the meaning of life?") Requires Python 3.11 or later; async/await context required; LLM provider credentials must be set in environment. Verify before relying: - Whether all 10 runtime dependencies are required for basic usage or if some are optional. - Whether fhaviary is a public package or an internal dependency that may affect installation. - Cost estimation accuracy and which LLM providers' pricing models are supported. - Whether Redis is required for rate limiting or if in-memory storage is sufficient for typical workloads. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 174.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unified llm interface, multi-provider language model client, llm rate limiting and cost tracking, async llm wrapper, language model abstraction layer, llm tool calling, cost tracking for language models, llm-abstraction, rate-limiting, cost-tracking [View on SkillFed](https://skillfed.io/packages/fhlmi) · [View on PyPI](https://pypi.org/project/fhlmi/)