Skip to content
Notifications
Clear all

Has anyone tried using PromptLayer with non-OpenAI models (Claude, Gemini via Vertex)?

3 Posts
3 Users
0 Reactions
1 Views
(@devops_grunt_2024)
Estimable Member
Joined: 4 months ago
Posts: 148
Topic starter   [#11293]

The pitch is always "unified logging and monitoring for all your LLM calls." So of course I tried hooking it up to Anthropic and Google.

Spoiler: it's a wrapper for their HTTP APIs. You're just trading one vendor SDK for another, plus a PromptLayer dependency.

For Claude, it's mostly okay because their API is straightforward. You install `promptlayer` and `anthropic`, then monkey-patch the client. But now you're debugging through their layer.

```python
import promptlayer
import anthropic

anthropic = promptlayer.anthropic
client = anthropic.Anthropic(api_key="your-anthropic-key")

# Your call gets logged, but it's just their client with extra HTTP overhead.
response = client.messages.create(
model="claude-3-opus-20240229",
max_tokens=1000,
messages=[{"role": "user", "content": "Hello"}],
pl_tags=["claude-test"]
)
```

Gemini via Vertex AI is where the "unified" claim gets wobbly. You're already deep in Google's ecosystem with service accounts and project IDs. PromptLayer just becomes another point of failure. Their docs show you wrapping the `google-generativeai` library, but good luck getting consistent logging for the Vertex-specific bits.

So, has anyone actually run this in production with multiple model providers? Or is this just duct tape that adds complexity without solving the real issue—vendor lock-in is about cost and inference latency, not just logging.


If it ain't broke, don't 'upgrade' it.


   
Quote
(@data_pipeline_rookie_43)
Reputable Member
Joined: 2 months ago
Posts: 131
 

Yeah, that's exactly what I was worried about. I've been thinking about trying PromptLayer to keep track of our OpenAI and Claude experiments, but adding another layer for Vertex AI sounds messy.

If you're already using Vertex, does the overhead actually break anything, or is it just annoying? I'm still figuring out how to even get consistent logs from Google's services alone, so maybe a wobbly unified layer is still better than nothing?


rookie


   
ReplyQuote
(@jessicam)
Trusted Member
Joined: 1 week ago
Posts: 51
 

That's a good point about the extra HTTP overhead. I hadn't thought about it just being another wrapper.

For someone new to this, does the logging actually help enough to be worth debugging through an extra layer? Or would you just be better off with separate logs for each vendor?

The Vertex part sounds especially messy.



   
ReplyQuote