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.2.4.tar.gz (244.1 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.2.4-py3-none-any.whl (238.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: visvoai_ai-0.2.4.tar.gz
  • Upload date:
  • Size: 244.1 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.2.4.tar.gz
Algorithm Hash digest
SHA256 86d40a961b01cf579d881095ac03f2485e15344bccd4d310f5403258859ec569
MD5 b07c28b91e8bb3f13dad6fb7ef9e4c4a
BLAKE2b-256 398b359793e57eb029c5d282e6856b8a86668dd0df9443f9a0b39a1ecf546cd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for visvoai_ai-0.2.4.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.2.4-py3-none-any.whl.

File metadata

  • Download URL: visvoai_ai-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 238.6 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.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 859f9cda832927947ed836d36c12ea2a7a705c410c228c75b3cd4b38349edea7
MD5 1c549b1c10134acdd00060f670198b92
BLAKE2b-256 0e76fc13d0e411e5f500c84709c41e7c943c4ec8b2c07542d77bf570f5f74557

See more details on using hashes here.

Provenance

The following attestation bundles were made for visvoai_ai-0.2.4-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

0.3.0

2 files

This release

0.2.4 This release

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