Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@huangdaxianer
Copy link
Contributor

Context

This PR removes the forced context compression logic for volces.com (Ark) endpoints.

Previously, requests to volces.com were automatically converted to a simplified text format using convertToSimpleMessages. This was likely a workaround for older limitations. However, volces.com now 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

  • Removed the ark variable which detected volces.com in the model URL in src/api/providers/openai.ts.
  • Removed the condition ark || from the logic that triggers convertToSimpleMessages.
  • Now volces.com endpoints will use the standard OpenAI message format (including convertToOpenAiMessages) unless enabledLegacyFormat is explicitly enabled by the user.

Screenshots

How to Test

  1. Configure a Custom OpenAI provider with a volces.com Base URL.
  2. Start a task that requires multiple steps or tool usage (e.g., "Check the weather in two different cities").
  3. Verify that the model can successfully execute multiple tool calls in sequence without losing context or hallucinating.
  4. Ensure that the conversation history is maintained correctly.

Get in Touch

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2026

🦋 Changeset detected

Latest commit: b9dac5f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 24, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR removes special-case handling for .volces.com URLs in the OpenAI provider. Previously, URLs containing .volces.com would force the use of legacy message format (simple messages). Now, only the explicit openAiLegacyFormat setting controls this behavior.

The changes are minimal and well-documented with kilocode_change markers as per project guidelines.

Files Reviewed (2 files)
  • .changeset/violet-planets-design.md - New changeset file
  • src/api/providers/openai.ts - Removed volces.com special handling
Minor Observation

The changeset description mentions "context compression" but the actual code change is about message format conversion (legacy format vs OpenAI format). This is a minor documentation detail and doesn't affect functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants