feat: OpenAI, Anthropic, and native-Ollama providers + media pipeline

Phase 3:
- provider/openai: Chat Completions for OpenAI + compat endpoints (SSE
  streaming with by-index tool-call assembly, response_format json_schema,
  legacy max_tokens option, reasoning_effort)
- provider/anthropic: Messages API (tool_use/tool_result, GA structured
  output via output_config.format, full SSE event parser, 529 transient)
- provider/ollama: one native /api/chat client behind the ollama,
  ollama-cloud, and foreman built-ins (presets; NDJSON streaming tolerant
  of foreman's buffered single-object responses; object tool arguments;
  format-schema structured output; think mapping)
- media/: capability normalization (sniff, downscale, transcode, byte
  ladder, ErrUnsupported), wired into the chain executor per target with
  penalty-free advance past incapable elements
- registry: real provider + scheme wiring, WithHTTPClient option, required
  env-foreman TLS chat round-trip test
- ADR-0009 multimodal strategy, ADR-0010 tools/structured mapping; README
  matrix + CLAUDE.md synced

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 12:58:08 +02:00
parent 323558ed72
commit 043249e0e1
31 changed files with 6194 additions and 74 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ func TestParseModelIDIsVerbatim(t *testing.T) {
// Everything after the first slash, up to the next comma, is the model
// id: colons and additional slashes pass through untouched.
for spec, want := range map[string]string{
"ollama-cloud/minimax-m3:cloud": "ollama-cloud/minimax-m3:cloud",
"google/models/gemini-3.0-pro": "google/models/gemini-3.0-pro",
"ollama-cloud/minimax-m3:cloud": "ollama-cloud/minimax-m3:cloud",
"google/models/gemini-3.0-pro": "google/models/gemini-3.0-pro",
"ollama-cloud/qwen3-coder:480b-cloud": "ollama-cloud/qwen3-coder:480b-cloud",
} {
m, err := r.Parse(spec)