Catalog PyPI
Back to packageRELEASE DETAILS

0.72.0

PyPI

3tears-models

LangChain-native AI model factories with capability metadata, circuit breakers, and usage tracking for the 3tears platform

Published20 Oct 2026
Direct dependencies18
Transitive dependenciesNot calculated

README

Version 0.72.0 documentation

3tears-models

LangChain-native AI model factories for the 3tears framework. Build chat and embedding models from a single call, with capability metadata, circuit breakers, error translation, and usage tracking wired in.

pip install 3tears-models

What you get

  • Factories -- create_chat_model() and create_embedding_model() return standard LangChain BaseChatModel / Embeddings instances. No custom runtime protocols to learn.
  • Providers -- Anthropic, OpenAI, OpenRouter, VoyageAI, Whisper, and image backends (OpenAI Images, HuggingFace, A1111, ModelsLab, ComfyUI), and clients for self-hosted ComfyUI and SwarmUI servers (ComfyUIClient, SwarmUIClient: your own graph or parameters, reads retried, work never sent twice).
  • Capability registry -- get_capabilities(), register_capabilities(), and per-model overrides describe context windows, vision support, tool support, and tier.
  • Circuit breakers -- CircuitBreaker and CircuitBreakerRegistry trip on repeated provider failures and recover on a timer. The factory's default breaker is per provider and per API key, so one caller's failing key never fast-fails another key on the same provider.
  • Usage tracking -- UsageTracker.record() emits an OpenTelemetry span plus Prometheus instruments, with optional per-application audit and counter sinks.
  • Message hygiene -- preprocess_messages(), enforce_alternating_roles(), filter_invalid_tool_calls(), and streaming chunk helpers (parse_chunk, merge_chunks).

Quickstart

from threetears.models import create_chat_model, create_embedding_model

chat = create_chat_model("claude-sonnet-4-6")
reply = await chat.ainvoke("Summarize three-tier caching in one sentence.")

embedder = create_embedding_model("voyage-3")
vectors = await embedder.aembed_documents(["first doc", "second doc"])

Capabilities, circuit breakers, and usage tracking attach automatically. Reach for the registry and tracker APIs directly when you need to inspect or override them.

License

MIT. See LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 19

Native requirements
18 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
3tears-media-contracts
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
3tears-media-contracts<0.73.0,>=0.72.0runtime
3tears-observe
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
3tears-observe<0.73.0,>=0.72.0runtime
3tears-tool-schema
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
3tears-tool-schema<0.73.0,>=0.72.0runtime
anthropic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.116runtime
jsonschema
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
jsonschema>=4.26runtime
langchain-anthropic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-anthropic>=1.4runtime
langchain-core
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.3runtime
langchain-openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-openai>=1.1runtime
langchain-openrouter
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-openrouter>=0.2.9runtime
openrouter
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
openrouter<1.0,>=0.9.2runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0runtime
uuid-utils
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
uuid-utilsruntime
3tears-langgraph
Environment
{
  "extras": "",
  "marker": "extra == \"claude-cli\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
3tears-langgraph<0.73.0,>=0.72.0; extra == "claude-cli"runtime
claude-agent-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"claude-cli\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
claude-agent-sdk<0.3,>=0.2.163; extra == "claude-cli"runtime
langchain-claude-code
Environment
{
  "extras": "",
  "marker": "extra == \"claude-cli\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-claude-code>=0.1.0; extra == "claude-cli"runtime
httpx
Environment
{
  "extras": "",
  "marker": "extra == \"image\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27; extra == "image"runtime
prometheus-client
Environment
{
  "extras": "",
  "marker": "extra == \"prometheus\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
prometheus-client>=0.20; extra == "prometheus"runtime
langchain-voyageai
Environment
{
  "extras": "",
  "marker": "extra == \"voyageai\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
langchain-voyageai>=0.3; extra == "voyageai"runtime
httpx
Environment
{
  "extras": "",
  "marker": "extra == \"whisper\"",
  "requires_python": ">=3.14",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27; extra == "whisper"runtime

Distribution files

2 collected
3tears_models-0.72.0-py3-none-any.whl

bdist_wheel · 213.66 KB · Python py3

Source file
3tears_models-0.72.0.tar.gz

sdist · 386.05 KB · Python source

Source file

Repository

ACCESSIBLE
pacepace/3tears

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
develop
Last push
20 Oct 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots20 Oct 2026
10.50
2026-10-20: 0 · observed 2026-10-20T17:18:19.8928356Z
20 Oct20 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2002026-10-20T17:18:19.8928356Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 15:38 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:38607b43dae2eacab072ae697f28a57a150dff951ba467bd9987fd88ffbfc357

Other collected versions

View all collected versions →