feat: selectable wire format — ollama (default), openai (vLLM etc.), anthropic
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 2s
sign-bundle / sign (push) Failing after 1m51s

Port the multi-API client from llm.chat (llm.rs kept in lockstep):
the optional api input selects the dialect, default stays the
unchanged v0.1.x Ollama behavior. openai covers vLLM, LM Studio,
LiteLLM and cloud OpenAI; api-specific error hints; api_key sent
as Bearer (ollama/openai) or x-api-key (anthropic). model_digest
stays an Ollama-only best-effort probe and is documented as such.

Proven end-to-end against a hermetic OpenAI-wire fake (request
shape validated, response parsed) via a hub flow run.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-08-20 16:32:59 +02:00
parent 47db969564
commit c54c14b28a
6 changed files with 567 additions and 93 deletions

View file

@ -5,7 +5,7 @@
[package]
name = "text_translate"
version = "0.1.0"
version = "0.2.0"
edition = "2024"
license = "Apache-2.0"
publish = false