picoclaw/pkg/providers
maxiaoyang ce0f526bf1 feat(providers/openai_responses_common): prefix user content with sender name
The OpenAI Responses API (used by Codex and the Azure responses
endpoint) is a separate wire format from Chat Completions. The SDK
type used here, EasyInputMessageParam, does not currently surface a
per-message name field, so the same in-content prefix fallback used
for Anthropic and Bedrock applies here too.

Both branches of the user-message path are covered:

- The plain-text branch (OfMessage / EasyInputMessageParam) prefixes
  msg.Content via messageutil.ApplyUserNamePrefix.
- The multipart branch (OfInputMessage / ResponseInputItemMessageParam,
  used when media is attached) prefixes the text portion before
  passing it to BuildMultipartContent.

The function-call-output branch (msg.ToolCallID set) is intentionally
left untouched; tool results are not user utterances and must not
gain a sender prefix.

Tests cover all three paths (plain-text prefix, multipart prefix,
tool result untouched) by JSON-marshalling the resulting input and
asserting on the wire bytes.

Refs #2702.
2026-04-29 21:05:31 +08:00
..
anthropic feat(providers/anthropic): prefix user content with sender name 2026-04-29 21:04:37 +08:00
anthropic_messages feat(providers/anthropic_messages): prefix user content with sender name 2026-04-29 21:04:19 +08:00
azure feat: add userAgent config for ModelConfig (#2242) 2026-04-02 11:44:13 +08:00
bedrock feat(providers/bedrock): prefix user content with sender name 2026-04-29 21:05:07 +08:00
cli Feat(channels): unify animated tool feedback across chat channels and Pico (#2622) 2026-04-23 10:35:50 +08:00
common feat(providers/common): emit OpenAI Chat Completions name field 2026-04-29 21:03:48 +08:00
httpapi fix(reasoning): persist canonical history for DeepSeek and web chat 2026-04-24 21:45:41 +08:00
messageutil feat(messageutil): add IsSystemSenderID and ApplyUserNamePrefix helpers 2026-04-29 21:01:03 +08:00
oauth Deduplicate further functions 2026-04-23 05:50:37 +00:00
openai_compat fix(reasoning): persist canonical history for DeepSeek and web chat 2026-04-24 21:45:41 +08:00
openai_responses_common feat(providers/openai_responses_common): prefix user content with sender name 2026-04-29 21:05:31 +08:00
protocoltypes feat(protocol): add Name field to providers.Message 2026-04-29 20:54:11 +08:00
cli_facade.go refactor(providers): reorganize provider packages and facades 2026-04-17 12:42:03 +08:00
cli_factory_test.go refactor(providers): reorganize provider packages and facades 2026-04-17 12:42:03 +08:00
cooldown.go style: fix gofmt formatting in cooldown files 2026-02-13 12:26:44 -03:00
cooldown_test.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
error_classifier.go fix(network): classify timeout errors as FailoverTimeout 2026-04-16 22:00:13 +08:00
error_classifier_test.go fix(network): classify timeout errors as FailoverTimeout 2026-04-16 22:00:13 +08:00
facade_compat_test.go fix(providers,tools): address linter issues after reorg 2026-04-17 14:16:18 +08:00
factory.go refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
factory_provider.go fix(reasoning): persist canonical history for DeepSeek and web chat 2026-04-24 21:45:41 +08:00
factory_provider_test.go refactor: support explicit provider field in model list entries (#2609) 2026-04-22 11:28:47 +08:00
factory_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
fallback.go feat(model): llm rate limiting (#2198) 2026-04-02 19:26:26 +08:00
fallback_multikey_test.go feat(model): llm rate limiting (#2198) 2026-04-02 19:26:26 +08:00
fallback_test.go refactor(tests): extract common logic for fallback error handling into a helper function 2026-04-16 22:45:31 +08:00
httpapi_facade.go refactor(providers): reorganize provider packages and facades 2026-04-17 12:42:03 +08:00
legacy_provider.go refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
model_ref.go feat(provider): add Alibaba Coding Plan and regional Qwen endpoints (#1748) 2026-03-19 22:07:30 +08:00
model_ref_test.go feat(provider): add Alibaba Coding Plan and regional Qwen endpoints (#1748) 2026-03-19 22:07:30 +08:00
oauth_facade.go refactor(providers): reorganize provider packages and facades 2026-04-17 12:42:03 +08:00
ratelimiter.go feat(model): llm rate limiting (#2198) 2026-04-02 19:26:26 +08:00
ratelimiter_test.go feat(model): llm rate limiting (#2198) 2026-04-02 19:26:26 +08:00
toolcall_utils_test.go Feat(channels): unify animated tool feedback across chat channels and Pico (#2622) 2026-04-23 10:35:50 +08:00
types.go feat(web): download files on frontend (#2563) 2026-04-22 11:28:04 +08:00