Skip to main content

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).
  • 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.
  • 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.

Download files

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

Source Distribution

3tears_models-0.26.1.tar.gz (178.6 kB view details)

Uploaded Source

Built Distribution

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

3tears_models-0.26.1-py3-none-any.whl (112.6 kB view details)

Uploaded Python 3

File details

Details for the file 3tears_models-0.26.1.tar.gz.

File metadata

  • Download URL: 3tears_models-0.26.1.tar.gz
  • Upload date:
  • Size: 178.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for 3tears_models-0.26.1.tar.gz
Algorithm Hash digest
SHA256 1f09acb78545a62dcab9ea3ce9ff9556eb959c7192aa0a69280b82b42850a283
MD5 84c018cb27b3905ee87104da86e3d60d
BLAKE2b-256 a727da96552c97e9bf24035bf63c1096ac976acee9c01c2acfb0d2c40781d250

See more details on using hashes here.

Provenance

The following attestation bundles were made for 3tears_models-0.26.1.tar.gz:

Publisher: release.yml on pacepace/3tears

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

File details

Details for the file 3tears_models-0.26.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for 3tears_models-0.26.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e58a6fe7523d4b12400925080b68a1dca8e14a20969bd71e62c717fc1a064c7
MD5 4d8667ded839d03ecc2e8f546b1b401b
BLAKE2b-256 6481ac712a6844ce837d316a5a6cdfe877f50979f4120b406779d707a3572b79

See more details on using hashes here.

Provenance

The following attestation bundles were made for 3tears_models-0.26.1-py3-none-any.whl:

Publisher: release.yml on pacepace/3tears

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.27.0

2 files

This release

0.26.1 This release

2 files

0.26.0

2 files

0.25.0

2 files

0.24.7

2 files

0.24.6

2 files

0.24.5

2 files

0.24.4

2 files

0.24.3

2 files

0.24.2

2 files

0.24.1

2 files

0.24.0

2 files

0.23.11

2 files

0.23.10

2 files

0.23.9

2 files

0.23.8

2 files

0.23.7

2 files

0.23.6

2 files

0.23.5

2 files

0.23.3

2 files

0.23.2

2 files

0.23.1

2 files

0.23.0

2 files

0.22.5

2 files

0.22.4

2 files

0.22.3

2 files

0.22.2

2 files

0.22.1

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.4

2 files

0.19.3

2 files

0.19.2

2 files

0.19.1

2 files

0.19.0

2 files

0.18.0

2 files

0.17.9

2 files

0.17.8

2 files

0.17.7

2 files

0.17.6

2 files

0.17.5

2 files

0.17.4

2 files

0.17.3

2 files

0.17.2

2 files

0.17.1

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.1

2 files

0.14.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page