Jack Collins
Jack Collins
Once #424 surfaces ToolValidationError/ToolStreamError, RetryChatModel.register_handler should let users plug those in, so the same retry flow handles user-function failures as well as completions/parse errors ?
Thanks @piiq ! I would also suggest making sure ollama is updated to the latest version. And to help debug you can turn on logs / use logfire to see...
Hi! I haven't thought much about what integrating MCP would look like. Naively I hope this could be a new `mcp_servers` parameter to `prompt`, `Chat`, etc. Similar to how pydantic-ai...
> (also?) allow passing an OpenAI client into the init of OpenaiChatModel. This might be generally useful. Let's avoid this if possible so that `ChatModel` parameters remain easily serializable so...
It's not currently possible but it could definitely be added. The code you link is old. The newer version would be even more simple to update. https://github.com/jackmpcollins/magentic/blob/6747d99dc37f0becbfbb12fdfdc17392da343ee0/src/magentic/chat_model/litellm_chat_model.py#L153-L155 I think a...
> would you be open to a pr if I have a go at this? @benwhalley Absolutely!
I haven't tried it yet, but looks like it's available on ollama https://ollama.com/library/deepseek-r1 so it might already work with magentic via ollama's openai-compatible API https://magentic.dev/configuration/#ollama-via-openai See example here: https://github.com/jackmpcollins/magentic/issues/207#issuecomment-2507359293 Please...
Right now all structured output in magentic uses tool calls which these models don't support. `o1` (but not `o1-mini` I think) supports openai's structured outputs, which magentic should really be...
Hi @ashwin153 Your approach sounds right to me! I think magentic could have custom Message objects for different providers to support the params that they differ on. So in this...
Actually seeing now that this is in the `system` section of the Anthropic request, so it needs an update in magentic itself. https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching You could create an `AnthropicSystemMessage`, no need...