-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Summary
Kimi Code provider fails to send requests to API endpoint, causing agent to hang during tool execution.
Problem Statement
When using the kimi-code provider with model kimi-k2.5, the provider call fails with a transport error:
Provider call failed, retrying provider="kimi-code" model="kimi-k2.5" attempt=1 backoff_ms=500 reason="retryable" error=Kimi Code native chat transport error: error sending request for url (https://api.kimi.com/coding/v1/chat/completions) (responses fallback failed: Kimi Code Responses API error: {"error":{"message":"T...
This error occurs during normal agent operation when executing sandbox commands, causing the workflow to hang indefinitely.
Steps to Reproduce
- Configure
kimi-codeas the provider with modelkimi-k2.5 - Start the agent with any channel (Signal, Telegram, etc.)
- Send a message requesting to build a project (e.g., "build a coffee landing page")
- Agent calls
sandbox_createsuccessfully - Agent calls
sandbox_run_commandto initialize project - Provider fails when trying to continue the conversation
Expected Behavior
- Provider should successfully send requests to
https://api.kimi.com/coding/v1/chat/completions - If the API fails, it should fail fast with a clear error message instead of hanging
- Fallback mechanism should work correctly
Actual Behavior
- Transport error occurs when sending request to Kimi Code API
- Retry mechanism kicks in but continues to fail
- Agent hangs waiting for provider response
Environment
- Provider:
kimi-code - Model:
kimi-k2.5 - ZeroBuild version: latest
- OS: macOS (from log paths
/var/folders/...)
Proposed Solution
- Investigate the Kimi Code provider's HTTP client configuration
- Add proper timeout handling to prevent indefinite hangs
- Improve error handling and logging for transport errors
- Consider adding circuit breaker pattern for failing providers
Non-goals / Out of Scope
- Changing the underlying Kimi API
- Supporting other Kimi models beyond k2.5
Acceptance Criteria
- Kimi Code provider successfully sends requests without transport errors
- Clear error message is shown when API is unavailable
- Agent does not hang when provider fails
- Retry logic has maximum attempt limit with backoff
Architecture Impact
- Affects:
src/providers/module - May require changes to error handling in provider trait
Risk and Rollback
Risk: Low - This is a bug fix for existing functionality
Rollback: Revert provider changes if issues arise
Breaking Change
No breaking changes expected.
Data Hygiene Checks
- No sensitive data (API keys, tokens) in logs
- Error messages don't expose internal URLs or credentials
Reactions are currently unavailable