Using Pydantic with Z.AI: GLM 4.6 on OpenRouter
This tutorial explains how to use a Pydantic schema to extract structured data using Z.AI: GLM 4.6. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Z.AI: GLM 4.6. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Claude Sonnet 4.5. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using TheDrummer: Cydonia 24B V4.1. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
I tested sending 100 requests each to both GPT-5 and Gemini Pro 2.5 to extract information from clinical narratives into a very complex Pydantic schema I used the following metrics: is_pure_json contains_valid_json is_valid_schema to measure how well they adhered to the Pydantic schema Sometimes the LLMs will not even produce valid JSON as a substring…
This tutorial explains how to use a Pydantic schema to extract structured data using Gemini 2.5 Flash Preview 09-2025. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Gemini 2.5 Flash Lite Preview 09-2025. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using GPT-5 Codex. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Qwen3 Max. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Qwen3 VL 235B A22B Instruct. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
This tutorial explains how to use a Pydantic schema to extract structured data using Qwen3 VL 235B A22B Thinking. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics
No matter how much money you are spending on OpenRouter, it is possible to increase the RoI by writing some additional Python code. Why? Because no matter which LLM you use, some percentage of responses will return invalid JSON. Usually, you will do a retry, which costs (say) $X Most of the time, the invalid…
This tutorial explains how to use a Pydantic schema to extract structured data using DeepSeek V3.1 Terminus. Please read this tutorial first to understand the basic setup Code: LLM Response: Metrics