Conversation
…ropic-compatible endpoints
haoruilee
pushed a commit
that referenced
this pull request
Mar 16, 2026
1. [P1] Treat remap failures as resume failures — if replaceSubagentRunAfterSteer returns false, do NOT clear abortedLastRun, increment failed count. 2. [P2] Count scan-level exceptions as retryable failures — set result.failed > 0 in the outer catch block so scheduleOrphanRecovery retry logic triggers. 3. [P2] Persist resumed-session dedupe across recovery retries — accept resumedSessionKeys as a parameter; scheduleOrphanRecovery lifts the Set to its own scope and passes it through retries. 4. [Greptile] Use typed config accessors instead of raw structural cast for TLS check in lifecycle.ts. 5. [Greptile] Forward gateway.reload.deferralTimeoutMs to deferGatewayRestartUntilIdle in scheduleGatewaySigusr1Restart so user-configured value is not silently ignored. 6. [Greptile] Same as #4 — already addressed by the typed config fix. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
anthropic-beta: fine-grained-tool-streaming-2025-05-14, interleaved-thinking-2025-05-14into everyanthropic-messagesrequest. MiniMax's Anthropic-compatible endpoint does not support these beta features. When these unrecognised headers are present, MiniMax returns the entire response as a single SSE chunk instead of incremental token deltas, which is why the TUI shows the complete response all at once.Authorization: Bearer <key>, but the Anthropic SDK sendsX-Api-Key: <key>by default. TheauthHeader: trueconfig flag existed in the schema and was set for MiniMax, but was never consumed at runtime — it was a no-op.createBearerAuthWrapperandresolveProviderAuthHeaderinextra-params.ts. WhenauthHeader: trueis set on a provider, a stream wrapper: (1) convertsX-Api-Keyauth toAuthorization: Bearer, and (2) nulls out theanthropic-betaheader so pi-ai's injected betas don't reach MiniMax. The Anthropic SDK treatsnullheader values as explicit deletions. Added 4 unit tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
MiniMax streaming now works correctly in TUI — responses stream token-by-token instead of appearing all at once. No config changes required for existing users.
Security Impact (required)
NoYes— API key is moved fromX-Api-KeytoAuthorization: Bearerfor providers withauthHeader: true. Key value unchanged, only the header name changes.NoNoNoRepro + Verification
Environment
Steps
MINIMAX_API_KEYExpected
Response streams token-by-token
Actual (before fix)
Complete response displayed at once — no incremental streaming
Evidence
extra-params.bearer-auth.test.ts, all passing; 812-test suite passesbuildHeadersmerge order placesoptions.headersafterdefaultHeaders, so null values inoptions.headersdelete pi-ai's injected betas (confirmed in SDK sourceinternal/headers.js)Human Verification (required)
validateHeadersacceptsauthorizationpresence; null header values delete earlier headers viabuildHeadersCompatibility / Migration
YesNoNoFailure Recovery (if this breaks)
authHeader: falsein provider configsrc/agents/pi-embedded-runner/extra-params.tsRisks and Mitigations
buildHeadersbehaviourvalidateHeaders; tested with SDK 0.73.0anthropic-betafor allauthHeader: trueproviders could block legitimate future betas for these endpointsauthHeader: true(third-party Anthropic-compatible endpoints). Standard Anthropic direct uses a different code path.