fix: remove forced context compression for volces.com #5364
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.
Context
This PR removes the forced context compression logic for
volces.com(Ark) endpoints.Previously, requests to
volces.comwere automatically converted to a simplified text format usingconvertToSimpleMessages. This was likely a workaround for older limitations. However,volces.comnow fully supports multi-turn tool calling. The forced compression strips away structured information (like tool calls and results), causing the model to hallucinate or fail to understand previous tool interactions.Implementation
arkvariable which detectedvolces.comin the model URL insrc/api/providers/openai.ts.ark ||from the logic that triggersconvertToSimpleMessages.volces.comendpoints will use the standard OpenAI message format (includingconvertToOpenAiMessages) unlessenabledLegacyFormatis explicitly enabled by the user.Screenshots
How to Test
volces.comBase URL.Get in Touch