fix(agent-core-v2): skip deterministic provider validation retries#1603
Merged
Conversation
|
commit: |
Signed-off-by: _Kerman <kermanx@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Follow-up to #1598 and its review finding about deterministic provider validation errors.
Problem
The v2 retry fallback introduced in #1598 treats every base
ChatProviderErroras transient. The Anthropic adapter uses that base error for malformed image data URLs and unsupported base64 image media types before making an HTTP request, so retrying repeats the same deterministic failure, delays the final error, and emits misleading retry events.What changed
Validation
pnpm --filter @moonshot-ai/agent-core-v2 exec vitest run test/app/llmProtocol/errors.test.ts test/agent/stepRetry/stepRetry.test.ts --maxWorkers=2(105 tests passed)pnpm --filter @moonshot-ai/agent-core-v2 test -- --reporter=dot(3,159 tests passed)pnpm --filter @moonshot-ai/agent-core-v2 typecheckpnpm --filter @moonshot-ai/agent-core-v2 lint:domainpnpm exec oxlint --type-aware packages/agent-core-v2/src/app/llmProtocol/errors.ts packages/agent-core-v2/test/app/llmProtocol/errors.test.tspnpm exec changeset statuspnpm --filter @moonshot-ai/agent-core-v2 dep-graph:lintstill reports the 21 pre-existing unresolvedIAgentWireServicebinding errors frommain; none of its findings are in files changed by this PR.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. (No documentation update is needed for this retry-classification bug fix.)