Repository navigation
Any luck integrating with Ollama or LM Studio? #1303
Replies: 2 comments
|
I'm probably late for OP but I solved like this: My problem now is finding a model that runs locally that actually manages to return proper answers (zodschemavalidation always fails). But the LLM is invokated correctly. |
|
The snippet above is the right shape for Ollama/LM Studio: use CustomOpenAIClient with an OpenAI-compatible baseURL. One caveat for v3 is that this path still expects chat-completions-style responses and Stagehand validates the model output against Zod schemas. So if the request reaches Ollama but act/extract keeps failing with schema validation, the integration is working and the model is the weak link. Use an instruction-tuned model that reliably returns strict JSON, set temperature low, and start with extract/observe before expecting agent-style tasks to work well locally. |
Uh oh!
There was an error while loading. Please reload this page.
I tried for the better part of this weekend to get Stagehand working with a Local LLM - which based on a few gists I assumed was something that worked/was loosely supported?
Still new, but it looks like Stagehand v3 has changed from using /v1/chat/completions endpoint to a newer /v1/responses endpoint. For the life of me I couldn't get either Ollama or LM Studio models to work using the newer endpoint, but still very green so might be missing something.
If this was intentional, if anyone could jot up some notes on how to get it to work, I would be appreciative. Really love the potential of Stagehand + the massive improvements in V3.
Cheers.
All reactions