Try it out in 1 command:
git clone https://t.co/BgAxFbxO2B
cd palimpsest-gateway && docker compose up -d
Call from any OpenAI client
Star โญ if useful ! PRs welcome.
Built the thing I wished existed: a self-hosted gateway that pools all your LLM keys, fails over automatically, and keeps conversations alive across the switch.
OpenAI-compatible. MIT licensed. docker compose up and done. ๐ https://t.co/BgAxFbylS9
Your JSON schema isn't a prompt instruction. It's a tool's parameters.
Define the tool. Tell the model the only way to answer is to call it. The tool call IS the structured output.
Full pattern: https://t.co/yWza9bT5eJ
What do you use schema-as-tool or regex salvage?
What it doesn't do : server-initiated notifications, multi-message streams.
I'd rather say that now than have you find it in production.
https://t.co/jIyZHqhhfJ
#PHP#MCP
"Why not just run the MCP server in Python and call it from PHP ?"
I did that first. Then I wrote the client instead - 235 lines, Streamable HTTP, no subprocess.
Gotcha 2: the reply can be a plain JSON body or a single SSE event. Send "Accept: application/json, text/event-stream" and pull the payload out of the data: field when it's a stream.
Stop prompting for JSON, Start calling a tool.
Define a tool whose input schema is the exact shape you want. Tell the model to call it with the data. The tool call constitutes the structured output.
https://t.co/h6jdDiL1RP
#PHP#AI#LLM
The whole PHP-to-MCP integration:
$client = new McpClient($mcpUrl);
$agent->registerMcpServer($client);
No sidecar, no framework, no config file. Every tool the server exposes is callable.
Under 30 files - 0 deps - MIT
https://t.co/jIyZHqhhfJ
#PHP#MCP
Article + code: https://t.co/MdSKmyORjk (my PHP-AI series, article #04) https://t.co/h6jdDiLzHn
and https://t.co/jIyZHqhhfJ
Stop prompting for JSON. Start contracting for it.
"Return valid JSON, please."
You've typed that into a prompt. The model adds a sentence, a markdown fence, and a missing field. Your parser dies.
Here's the pattern that actually works โ
This is the one that matters most for real apps and for real industry: purchase orders, maintenance tickets, support threads, CVs. Unstructured in, typed out, and everything after it is normal engineering.