picoclaw/pkg/providers
AayushGupta16 994c0aea11 fix(providers): resolve tool_use name/args from Function on reloaded history
ToolCall.Name and .Arguments are json:"-" (runtime-only), so after chat
history round-trips through the session store only ToolCall.Function
survives. The anthropic-messages and anthropic (SDK) providers emitted
tool_use blocks from tc.Name alone, silently skipping every historical
tool call while still emitting the matching tool_result — orphaned
tool_results 400 at the API ("unexpected tool_use_id found in
tool_result blocks"), killing every turn on agents with tool history.

Fall back to Function.Name / json-parsed Function.Arguments (the same
pattern the bedrock and openai_compat providers already use), and cover
the deserialized-history shape with table tests in both providers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 21:26:34 -07:00
..
anthropic fix(providers): resolve tool_use name/args from Function on reloaded history 2026-07-05 21:26:34 -07:00
anthropic_messages fix(providers): resolve tool_use name/args from Function on reloaded history 2026-07-05 21:26:34 -07:00
azure Fix linting 2026-05-30 14:11:39 +00:00
bedrock Merge pull request #2982 from loafoe/fix/bedrock-opus48-temperature 2026-06-01 13:02:18 +02:00
cli Feat(channels): unify animated tool feedback across chat channels and Pico (#2622) 2026-04-23 10:35:50 +08:00
common fix(providers): surface friendly auth error messages (#3198) 2026-06-30 17:42:07 +08:00
httpapi style(test): split long t.Fatalf line to satisfy golines 120-char limit 2026-06-17 17:49:52 +08:00
messageutil fix(messageutil): remove dead code 2026-04-24 22:16:18 +08:00
oauth fix: preserve streamed Codex tool calls 2026-06-04 19:27:29 +02:00
openai_compat fix(openai_compat): remove unused log import 2026-07-04 14:34:58 +08:00
openai_responses_common Deduplicate ParseDataAudioURL function 2026-04-23 05:50:37 +00:00
protocoltypes feat(session): add per-message created_at timestamps 2026-05-22 13:15:56 +08:00
auth_error.go fix(providers): surface friendly auth error messages (#3198) 2026-06-30 17:42:07 +08:00
auth_error_test.go fix(providers): surface friendly auth error messages (#3198) 2026-06-30 17:42:07 +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(providers): surface friendly auth error messages (#3198) 2026-06-30 17:42:07 +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 feat(provider): add NEAR AI Cloud provider 2026-06-12 10:18:34 +00:00
factory_provider_azidentity_test.go Add azure entra id support for azure openai provider 2026-05-30 13:40:29 +00:00
factory_provider_test.go feat(provider): add NEAR AI Cloud provider 2026-06-12 10:18:34 +00:00
factory_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
fallback.go fix(agent): honor explicit thinking off (#2898) 2026-05-21 11:07:39 +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 refactor(models): unify provider metadata around backend catalog (#2896) 2026-05-20 11:50:34 +08:00
model_ref_test.go feat(provider): add gpt4free openai-compatible provider (#2909) 2026-05-21 16:08:46 +08:00
oauth_facade.go refactor(providers): reorganize provider packages and facades 2026-04-17 12:42:03 +08:00
provider_catalog.go refactor(models): unify provider metadata around backend catalog (#2896) 2026-05-20 11:50:34 +08:00
provider_metadata.go feat(provider): add NEAR AI Cloud provider 2026-06-12 10:18:34 +00: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
tool_schema_transform.go feat: support streaming (#2892) 2026-05-19 16:38:47 +08:00
tool_schema_transform_test.go fix test 2026-04-27 21:18:19 +02: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: support streaming (#2892) 2026-05-19 16:38:47 +08:00