Commit graph

21 commits

Author SHA1 Message Date
Meng Zhuo
81dfdf5f45
Merge pull request #1100 from zihan987/main
feat: add Vivgrid provider support
2026-03-08 11:03:13 +08:00
amagi
53cba73283 fix: resolve openai compat lint issues 2026-03-07 16:12:23 +08:00
amagi
6eaa49f7ab fix: improve openai compat HTML response handling 2026-03-07 15:50:08 +08:00
amagi
c1a3876f7d fix: improve error handling for non-JSON responses by checking content type and using a streaming JSON parser. 2026-03-06 01:51:24 +08:00
qs3c
9216cd14b5 fix(openai_compat): handle html error bodies and reduce allocations 2026-03-05 19:42:58 +08:00
zihan987
0c17c075da Merge remote-tracking branch 'origin_picoclaw/main' 2026-03-04 09:58:20 -08:00
zihan987
ea0b634b3b add Vivgrid config 2026-03-04 09:19:03 -08:00
qs3c
4946a8b449 fix(openai_compat): clarify HTML response errors 2026-03-04 17:54:04 +08:00
shikihane
6ccb68c63e fix: resolve linter issues (gci import grouping, gofumpt, govet shadow)
- Separate third-party imports from local module imports (gci)
- Fix byte slice literal formatting (gofumpt)
- Rename shadowed err variable to ftErr (govet)
- Remove trailing blank lines in test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 17:04:54 +08:00
shikihane
03f7ae494f feat(openai_compat): implement serializeMessages with multipart media support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 16:28:20 +08:00
Guoguo
407707a7cc
Revert "feat(agent): add vision/image support to agent pipeline" 2026-03-03 11:38:32 +08:00
Orgmar
12d4570a36
Merge pull request #990 from shikihane/feat/agent-vision-pipeline
feat(agent): add vision/image support to agent pipeline
2026-03-03 11:32:07 +08:00
shikihane
8ebeefc59f fix(agent,openai_compat): address review feedback on vision pipeline
- serializeMessages: preserve ToolCallID/ToolCalls when Media is present
- resolveMediaRefs: add 20MB file size limit to prevent OOM
- mimeFromExtension: return empty string for unknown extensions
- Add 11 unit tests for serializeMessages, resolveMediaRefs, mimeFromExtension

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:13:22 +08:00
Alfonso
946af6b53d
feat: add LiteLLM provider alias support (#930) 2026-03-03 08:23:55 +11:00
winterfx
9efdde25ad fix: preserve reasoning_content in multi-turn conversation history
The openaiMessage struct and stripSystemParts() were not carrying over
the ReasoningContent field when serializing conversation history for
API requests. This caused thinking models (e.g. kimi-k2.5) to receive
incomplete assistant messages on subsequent turns, resulting in 400
errors from the Moonshot API.

Add the ReasoningContent field to openaiMessage and copy it in
stripSystemParts(). Also add a test to verify reasoning_content is
preserved when sending conversation history.

Fixes #588
Related: #876

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 16:23:05 +08:00
Yiliu
438f764c7a
fix(providers): support per-model request_timeout in model_list (#733)
* fix(providers): support per-model request_timeout in model_list

* fix(lint): format provider constructors for golines

* refactor(providers): adopt functional options and preserve timeout migration

* docs(readme): sync request_timeout guidance across translated docs

---------

Co-authored-by: Yiliu <yiliu@affiliate-guide.com>
2026-02-26 19:08:19 +11:00
winterfx
d224397f40 fix: preserve reasoning_content for OpenAI-compatible reasoning models
Models like Moonshot kimi-k2.5 and DeepSeek-R1 return a
reasoning_content field in assistant messages. When thinking is enabled,
the API requires this field to be echoed back in subsequent requests.
PicoClaw was silently dropping it, causing 400 errors on tool-call
round-trips.

- Add ReasoningContent to Message and LLMResponse types
- Parse reasoning_content in openai_compat parseResponse()
- Carry reasoning_content through assistant tool-call messages
- Add unit test for reasoning_content parsing

Fixes #588
2026-02-21 23:29:40 +08:00
Artem Yadelskyi
9e120f90ea
feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
Jared Mahotiere
c4cbb5fb35 providers: finalize PR213 review fixes
Phase 1: centralize protocol message/tool/response types in protocoltypes and keep compatibility aliases in providers and protocol packages.

Phase 1: preserve HTTPProvider constructor compatibility and route Anthropic api_base through factory auth/provider constructors with base URL normalization.

Phase 2: expand provider routing/auth tests (deepseek/nvidia/shengsuanyun, codex/claude oauth/codex-cli) and add openai_compat + anthropic coverage for proxy transport, model normalization, numeric option coercion, token-source refresh, and base URL behavior.

Phase 3: apply gofmt and validate with Dockerized tests (go test ./pkg/providers/... ./pkg/migrate and go test ./...).
2026-02-17 11:13:10 -05:00
Jared Mahotiere
e3c246a36f Merge origin/main into refactor/provider-protocol-122 2026-02-17 09:28:56 -05:00
Jared Mahotiere
a6e885bb47 refactor(providers): extract protocol factory and openai-compat transport 2026-02-15 08:04:07 -05:00