Repository navigation
feat(llm): text_content driver option for string message content on OpenAI-compatible endpoints - #296
Merged
Merged
Conversation
…inking vLLM, SGLang and DeepSeek return reasoning as message.reasoning or message.reasoning_content, and stream it in the same delta fields. The OpenAI-compatible driver read only reasoning_details, so that reasoning was dropped. It now fills metadata.thinking from either field, streamed or not, streams the deltas as thinking chunks, and keeps reasoning_details first when a provider sends both.
…penAI-compatible endpoints Some OpenAI-compatible servers accept only string message content. The openai_compat driver declares the context option text_content (parts by default, or string): with string, generate and structured_output send a text-only system or user message as its joined text, and a message that carries an image keeps its content part array. An unknown value fails the request as invalid before any HTTP request. Set it on a provider entry's driver.options or a route's options to bind the upstream driver to such an endpoint.
Contributor
Author
|
The final head reads the single Signed Wippy 0.3.68a passed 3,050 native cases with nine skips and clean lint. The real binding against a loopback receiver verified generation, structured output, both directions of the provider/model-card override, image content, and rejection before HTTP for invalid values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some OpenAI-compatible servers accept only string message content, so hosts fork the openai_compat generate handler to flatten it. A fork drifts from the driver: it misses route thinking facts, the
options.requestoverlay and newer reasoning mapping.This declares a typed context option on the
wippy.llm.openai_compat:driverbinding:text_content:parts(default, unchanged wire format) orstring.string,generateandstructured_outputsend a text-only system, developer or user message as its joined text; a message carrying an image keeps its content part array. Assistant and tool content stay strings as before.invalid_requestbefore any HTTP request.driver.optionsor on route options, so a provider can bind the upstream driver instead of copying it.Stacked on #295 (same files); retarget to master once it merges.
Tests: mapper (string form, image kept as parts, joined parts, option resolution, no cache breakpoint on strings), generate (default parts, string form together with
options.request, invalid value refused before HTTP), structured_output (string form, invalid value refused).src/llm/test: lint clean, 3047 tests pass.