Commit Graph

2 Commits

Author SHA1 Message Date
27183312ad adapters: 支持多模态(对照 llmsproxy)
- ollama: content 数组拆分文本/images(base64),映射到 Ollama messages.images;
  流式透传 reasoning_content 与增量 tool_calls
- anthropic: OpenAI content(字符串/数组) 转 Anthropic blocks(文本 + image{source})
  + thinking/空 arguments tool_use/input_json_delta 流
- openai 透传 adapter 已保留多模态 content 数组(验收确认)
- 新增多模态单测:ollama images / anthropic image.source / openai passthrough

验证: go test ./... 27 包 0 失败;Windows 交叉编译通过;部署后服务健康
2026-08-10 12:17:15 +08:00
f0dacef281 lua: 吸收 llmsproxy 适配器高级特性(worker 池/静态预提取/动态签名钩子)
- 适配器 worker 池化:单 LState+全局锁(串行瓶颈)→ 每 adapter 一个 gopher-lua
  LState 池,按使用该 adapter 的源并发上限求和配置池大小,并发 transform 互不阻塞
- staticInfo 预提取:name/version/endpoint/headers 加载期编译缓存,Endpoint/Headers
  读缓存不占 worker;加载即预编译首个 worker
- build_headers 动态钩子 + hmac/sha256/base64/tohex 全局:签名型上游(kimicode 等)可接入
- provider applyAdapterHeaders 接入动态头(url/method/body/api_key/timestamp/source 元数据),
  未定义时回落静态 headers,缺省补 Authorization
- LLMSource.MaxConcurrent + core.llm.sources.<name>.max_concurrent,注册时汇总
  VM.ConfigureConcurrency
- 新增 Lua VM 测试(load/transform/build_headers/并发)

验证: go test ./... 27 包 0 失败;Windows 交叉编译通过;部署后 9 adapter 全部预加载
2026-08-10 11:29:57 +08:00