What it is
adapter-openai-compatible.
TextModel port over the chat-completions wire for the Cratefield harness (issue #560) — one adapter for every server that answers that wire, because the base URL is a constructor argument, not a constant: OpenAI itself, Workers AI's OpenAI-compatible endpoint, OpenRouter, and local servers like vLLM, llama.cpp and Ollama. Uses the runtime's HttpClient port — no reqwest, no vendor SDK — so it runs unchanged on Workers (worker::Fetch) and natively, and inherits that port's destination vetting, deadline and response-size caps.
From the crate’s own README.
Ports
Implements TextModel
Read more
History
Changelog.
From the crate’s CHANGELOG.md in the harness, as of 0c5560b. 5 versions recorded, newest first. Every published version is on crates.io.
Other
- updated the following local packages: cratefield-core
Added
- core Speech port — transcription and streamed synthesis, with Workers AI and OpenAI-compatible adapters (#861) (#868)
Speechover the OpenAI audio wire (issue #861):OpenAiCompatibleSpeechtranscribes throughaudio/transcriptionsand synthesizes throughaudio/speechat any base URL, under the same key andNotConfiguredrules as the chat adapter, with the port's limits enforced before any request.- TextModel image inputs (issue #628): a
Prompt's imageParts serialise into the request'scontentarray ({"type":"image_url","image_url":{"url":"data:<media-type>;base64,…"}}), text-only messages keep their plain-string content, image input is opted into withOpenAiCompatible::with_images()(Capability::Images, off by default), an image prompt without it is refused withUnsupportedbefore any request, andPrompt::check_imagesbounds are enforced locally first.
Other
- streaming completions (text, reasoning, tool-call and usage deltas) with idle/total timeouts and cancel-on-drop (#869)
3 earlier versions 0.1.0 to 0.2.1
Other
- schema-validated structured output (complete_json / complete_as) (#739)
Changed
- Breaking: requires
cratefield-core0.8 (was 0.7), and so a minor rather than a patch bump: a venture still on core 0.7 does not pick this release up through a caret requirement and end up with two copies of core (#712).
- Breaking: requires
One of 76 crates in the harness, all of them MIT and all of them in one repository.