Mistral, Cohere and Vertex AI
Three providers recorded through their native SDKs on the synchronous path only, with the async and streaming gaps listed.
These three are recorded through their native SDKs rather than an OpenAI-compatible endpoint. All three cover the synchronous path and errors. None covers async or streaming.
For async or streaming here, use
record().
Mistral
| Call | Recorded |
|---|---|
client.chat.complete(...) | Yes |
client.chat.complete_async(...) | No |
client.chat.stream(...) | No |
client.embeddings.create(...) | No |
from mistralai import Mistral
import capsera
capsera.init(api_key=os.environ["CAPSERA_API_KEY"])
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
response = client.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Extract the invoice total."}],
)
Mistral also exposes an OpenAI-compatible endpoint. Pointing the openai client at
api.mistral.ai gives full coverage including async and streaming. See
OpenAI-compatible providers. If you need either, use
that route.
Catalog: mistral-large-latest, mistral-small-latest, open-mistral-nemo, and the
Bedrock-hosted variant.
Cohere
| Call | Recorded |
|---|---|
client.chat(...) on ClientV2 and Client | Yes |
client.chat_stream(...) | No |
| async client | No |
client.embed(...) | No |
import cohere
import capsera
capsera.init(api_key=os.environ["CAPSERA_API_KEY"])
client = cohere.ClientV2(api_key=os.environ["COHERE_API_KEY"])
response = client.chat(
model="command-r-plus-08-2024",
messages=[{"role": "user", "content": "Rerank these support articles."}],
)
Both the v2 and legacy v1 clients are patched. Cohere reports usage as either
billed_units or tokens depending on the endpoint, and the SDK reads whichever is
present.
Catalog: the Command R line and embed-english-v3.0. Embed calls are not recorded even
though the model is priced.
Vertex AI
| Call | Recorded |
|---|---|
model.generate_content(...) | Yes |
model.generate_content_async(...) | No |
chat.send_message(...) | No |
import vertexai
from vertexai.generative_models import GenerativeModel
import capsera
capsera.init(api_key=os.environ["CAPSERA_API_KEY"])
vertexai.init(project=os.environ["GOOGLE_CLOUD_PROJECT"], location="us-central1")
model = GenerativeModel("gemini-2.0-flash-001")
response = model.generate_content("Summarise this contract clause.")
Vertex pricing differs from the Gemini Developer API for the same model, and the catalog
keys them separately. gemini-2.0-flash-001 is the Vertex entry and gemini-2.0-flash
the Developer API one. The SDK labels the provider vertex rather than google for this
reason.
For the Developer API, see Google Gemini.
Vertex is the one provider not verified against a live API on release, because it requires a GCP service account rather than an API key. The patch is tested against its documented shapes.
Why coverage is thinner here
Coverage follows usage. Anthropic and OpenAI account for the majority of traffic and were implemented first, including async paths, streaming wrappers, and live verification. These three cover the path most applications use.
If a missing path blocks you, report it. record() covers the gap in the meantime.