llm-verse-avneesh
Async LLM router across AWS Bedrock (Claude, Amazon Nova), Google Gemini, and Groq (GPT OSS, Qwen).
A single Router.get_response(...) call validates its input, dispatches to
the requested model by name, and always returns a plain dict shaped like
LLMResponse — regardless of which
underlying provider handled the call.
Install
pip install "llm-verse-avneesh[aws]" # Bedrock (Claude, Nova) only
pip install "llm-verse-avneesh[google]" # Gemini only
pip install "llm-verse-avneesh[groq]" # Groq (GPT OSS, Qwen) only
pip install "llm-verse-avneesh[all]" # all three
Usage
import asyncio
from llm_verse_avneesh import Router
async def main():
router = Router()
result = await router.get_response(
llm_name="nova-lite",
system_prompt="You are a helpful assistant.",
user_prompt="Say hello in one sentence.",
context=None,
temperature=0.5,
pydantic_model=None,
max_tokens=200,
repo_name="my-repo",
llm_identifier="greeting-1",
region_name="us-east-1",
aws_access_key_id="...",
aws_secret_access_key="...",
)
print(result["response"])
asyncio.run(main())
For Gemini, pass google_api_key instead of the AWS credential fields. For
Groq, pass groq_api_key instead. For qwen-3.6-27b (the only vision-capable
model here), pass images=[...] (URLs or data:image/...;base64,... URIs,
max 5) alongside user_prompt to include images in the request.
Discovering models
Three callables let you explore what's registered without reading source:
import llm_verse_avneesh as lv
lv.help() # documents list_models(), model_info(), and Router.get_response()
lv.list_models() # [{"llm_name": "nova-lite", "display_name": "Amazon Nova Lite", "provider": "bedrock"}, ...]
lv.model_info("nova-lite") # required vs. optional arguments for that specific model
model_info(llm_name) returns exactly what that model needs and accepts —
e.g. Gemini models list google_api_key under required and Groq models
list groq_api_key, never AWS credentials; only models that actually
implement an agentic tool-calling loop (all chat models except
nova-2-lite-grounding) list tools/max_iterations under optional; only
qwen-3.6-27b lists images (vision input). It raises
ProviderNotFoundError for an unknown llm_name.
Registered model names
Registry keys match the name each provider documents publicly for the
model — not an internal AWS/Anthropic model ID. (See list_models() /
model_info() above for this same information at runtime.)
llm_name |
Provider | Notes |
|---|---|---|
claude-haiku-4-5 |
Bedrock | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
nova-lite |
Bedrock | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
nova-2-lite |
Bedrock | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
nova-2-lite-grounding |
Bedrock | web grounding; US regions only |
nova-pro |
Bedrock | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
gemini-3.1-flash-lite |
plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
|
gpt-oss-120b |
Groq | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
gpt-oss-20b |
Groq | plain text / structured output; pass tools=[...] for an agentic tool-calling loop |
qwen-3.6-27b |
Groq | plain text / structured output / vision (images=[...], max 5); pass tools=[...] for an agentic tool-calling loop |
Validation
LLMRequest(inmodels.py) does basic sanity checks: non-empty strings, non-negative temperature, positivemax_tokens, and that credentials for the selected provider are present.Router.get_responsethen enforces the actual per-model limits fromlimits.py— e.g. Gemini and Groq allow temperature up to 2.0 while the Bedrock models here cap at 1.0. Exceeding a model's limit raisesRouterValidationErrornaming the offending model and its limit. Updatelimits.pyif a provider changes its published limits.
Credentials
aws_secret_access_key, google_api_key, and groq_api_key are stored as
pydantic.SecretStr so they don't leak into repr(), str(), logs, or
model_dump() output by accident. Call .get_secret_value() only at the
point where a client needs the raw value.
Exceptions
All exceptions inherit from LLMRouterError:
RouterValidationError— bad input or a model-specific limit was exceeded.ProviderNotFoundError—llm_nameisn't registered.LLMCallError— the underlying provider call failed or raised.
Development
pip install -e ".[dev]"
pytest
Metadata
Release files for llm-verse-avneesh 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_verse_avneesh-0.2.0.tar.gz | 30.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_verse_avneesh-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.3 kB
Release files / llm_verse_avneesh-0.2.0.tar.gz
| Download URL | llm_verse_avneesh-0.2.0.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71849244b49e9b732b9116d4190607684d826a52c8597f07f133661d44f6dd57
|
|
BLAKE2b-256 checksum How to use checksums |
1e3b3f0a74df5d83e95bfd662921e5aec396b7d864895bdcb0fbc3d02e263d82
|
| 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 Aug 2, 2026.
Transparency logRelease files / llm_verse_avneesh-0.2.0-py3-none-any.whl
| Download URL | llm_verse_avneesh-0.2.0-py3-none-any.whl |
|---|---|
| Size | 41.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9406fa8d7a93275c013050e5a64930d9a505bf55e5ce934b98a730c75738cb06
|
|
BLAKE2b-256 checksum How to use checksums |
4bce0cac5beed5f4895a5e629c9e8c38a485105429cbf1344a7f824e6b4afe4a
|
| 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 Aug 2, 2026.
Transparency log