Skip to main content

Visvo AI

visvoai-ai

tests PyPI license: MIT

One line to any model — with the model facts included. (VisvoAI™)

Every provider has its own SDK, its own model names, its own pricing page, and its own spelling of "reasoning" — and your app ends up hardcoding all of it. visvoai-ai is the antidote: a streaming, LangChain-compatible chat model for whichever provider you name, plus the thing most facades skip — a live model registry that knows each model's pricing, context window, capabilities, and reasoning ("thinking") levels, so your app can choose and meter models, not just call them.

You say "anthropic:claude-sonnet-4-5", you get a working model — and you can ask it what it costs, how big its context is, and what it can do, before you spend a cent. No agent framework, no datastore, no web layer. Build a model, get out of the way.

It's a real LangChain model — the ecosystem works

build_chat_model returns a genuine LangChain BaseChatModel, so the patterns you already know apply unchanged: .with_structured_output(Schema) for JSON-schema-validated responses, timeout=/config for call limits, multimodal message parts for vision-capable models, and drop-in use anywhere LangChain or LangGraph expects a model.

Install

Base install is light; pull only the provider you use:

pip install "visvoai-ai[gemini]"      # Google Gemini
pip install "visvoai-ai[anthropic]"   # Anthropic Claude
pip install "visvoai-ai[openai]"      # OpenAI + any OpenAI-compatible endpoint
pip install "visvoai-ai[all]"         # everything

OpenAI-compatible providers (Together, Groq, OpenRouter, vLLM, …) ride the [openai] extra — an API key and a base_url is all they need.

One line to a model

from visvoai.ai import build_chat_model

model = build_chat_model("gemini:gemini-2.5-flash")          # a streaming BaseChatModel
model = build_chat_model("gemini:gemini-2.5-flash", level="high")   # with thinking

for chunk in model.stream("Explain attention in one sentence."):
    print(chunk.content, end="")

API keys resolve from the matching environment variable (GEMINI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, …); pass api_key= to override.

The registry: choose and meter, not just call

from visvoai.ai import list_deployments, Capability, cost_of, usage_from

for d in list_deployments(Capability.CHAT):
    print(d.id, d.display_name, d.input_cost_per_million, d.context_window,
          d.supports_thinking, [l.value for l in d.thinking_levels])

# after a call:
u = usage_from(response)                       # {'input': …, 'output': …, 'total': …}
usd = cost_of("gemini:gemini-2.5-flash", u["input"], u["output"])

The catalog is a curated baked set plus the models.dev catalog for providers you have keys for — so new models appear without a package upgrade, and a keyless install still shows a sane curated list.

Thinking levels, normalized

Every provider spells reasoning differently (budgets, effort strings, on/off). visvoai-ai normalizes them to one scale — off · low · medium · high — and translates per provider, with each model's supported levels declared in the registry. build_chat_model(id, level="medium") does the right thing everywhere.

Also in the box

  • run_search(...) / fetch_url(...) — provider-grounded web search and URL fetch behind one seam (used by agent tools; no SDK leakage into your code).
  • Provider base class — add a provider family by subclassing; only build_chat_model() and normalize_content() are core, both optional.
  • Deterministic deployment identity (provider:model codec) — stable ids you can store, route on, and bill against.

Who uses it

visvoai-core (agent runtime) and visvoai-cli (a terminal coding agent whose model picker is this registry, live) — plus a hosted platform on the same seam. If you only need "call one model I already chose," a raw SDK is fine; this earns its keep the moment you support choice — multiple providers, visible costs, or reasoning controls.

Examples

Runnable, live-verified examples in examples/ — one-line model access, registry choose-and-meter (keyless), OpenAI-compatible endpoints and custom providers.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visvoai_ai-0.3.0.tar.gz (245.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visvoai_ai-0.3.0-py3-none-any.whl (239.5 kB view details)

Uploaded Python 3

File details

Details for the file visvoai_ai-0.3.0.tar.gz.

File metadata

  • Download URL: visvoai_ai-0.3.0.tar.gz
  • Upload date:
  • Size: 245.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for visvoai_ai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 44bc8885db866d09d4af8a8411b0e4e6ba65d97ca7701cf33aec2f19d30ffcfd
MD5 07e8f1843c51c21aa621e6f627993861
BLAKE2b-256 485b48fc79b9fa879f563dd118c5a89c7c014faa36faddb87e9b01714d7611ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for visvoai_ai-0.3.0.tar.gz:

Publisher: publish.yml on VisvoAI/visvoai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file visvoai_ai-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: visvoai_ai-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 239.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for visvoai_ai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26468e12aede52add1975260af8af420bf5daf16d3c069a30fbcb4b26f25f976
MD5 52bb402b4bb21f9fbfb29c691ca89150
BLAKE2b-256 de9aa0357c46e9652b944631a340922cc78a2f893654737e46aa2a52d6b7e7b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for visvoai_ai-0.3.0-py3-none-any.whl:

Publisher: publish.yml on VisvoAI/visvoai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.4

2 files

0.2.3

2 files

0.0.1

2 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