Skip to content

Release v2.1.0: Kimi API JSON Mode and Web Search Support

Choose a tag to compare

@LegnaOS LegnaOS released this 10 Feb 09:19
· 44 commits to main since this release

Release v2.1.0: Kimi API JSON Mode and Web Search Support

πŸŽ‰ What's New

✨ Kimi API Advanced Features

This release adds full support for Kimi (Moonshot AI) API's advanced features, bringing the total Kimi API support to 100% for core functionality!

1️⃣ JSON Mode Support

  • Structured Output: Force Kimi to output valid, parseable JSON
  • Use Cases: Data extraction, structured responses, API integration
  • Implementation: Automatic response_format parameter passthrough
  • Example:
    {
      "response_format": {"type": "json_object"},
      "messages": [
        {"role": "system", "content": "Output JSON: {\"name\": \"...\", \"age\": ...}"},
        {"role": "user", "content": "ζˆ‘ε«εΌ δΈ‰οΌŒδ»ŠεΉ΄25岁"}
      ]
    }

2️⃣ Web Search Support

  • Built-in Search: Use Kimi's native $web_search function
  • Zero Configuration: No need to implement search/crawl functions
  • Automatic Handling: Proxy intercepts and returns arguments to Kimi
  • Example:
    {
      "tools": [{
        "type": "builtin_function",
        "function": {"name": "$web_search"}
      }]
    }

πŸ› Bug Fixes

Debug Log Cleanup

  • Removed excessive debug logging from OpenAI message construction
  • Cleaner console output for better debugging experience

Tool Definition Filtering

  • Removed edit-file from tool definitions sent to AI models
  • Prevents wasted round trips when AI tries to use unsupported tools
  • AI now directly uses str-replace-editor for file editing

File Editing Interruption Fix

  • Fixed issue where file editing operations would cause conversation to be interrupted
  • Conversation now continues properly after intercepted tool execution
  • Correct stop_reason handling (3 instead of 1)

πŸ“Š Kimi API Support Matrix

Feature Support Notes
Streaming βœ… 100% SSE format, [DONE] terminator, streaming tool_calls
Tool Calls βœ… 100% Parallel calls, index field, arguments accumulation
Thinking Mode βœ… 100% reasoning_content field support
JSON Mode βœ… 100% response_format parameter support
Web Search βœ… 100% $web_search builtin_function support
Partial Mode ⚠️ 50% Theoretical support, depends on Augment
File Interface ❌ 0% Not in proxy scope
Token Calculation ❌ 0% Not in proxy scope
Balance Query ❌ 0% Not in proxy scope

Core Functionality: βœ… 100%
Advanced Features: βœ… 83.3% (5/6)

πŸ”§ Technical Details

Modified Files

  • src/providers/openai.ts: Added responseFormat parameter support
  • src/tools.ts: Added builtin_function type support and $web_search interception
  • src/config.ts: Added Kimi provider configuration
  • package.json: Updated version to 2.1.0
  • README.md: Added JSON Mode and Web Search feature descriptions
  • CHANGELOG.md: Documented all changes

Implementation Highlights

JSON Mode:

// Automatically extracts and passes response_format to Kimi API
const responseFormat = augmentReq.response_format || undefined;
if (responseFormat) {
    requestBody.response_format = responseFormat;
}

Web Search:

// Intercepts $web_search and returns arguments as-is for Kimi to execute
if (toolName === '$web_search') {
    return {
        toolName,
        input,
        intercepted: true,
        result: input  // Return arguments unchanged
    };
}

πŸ“¦ Installation

Download augment-proxy-manager-2.1.0.vsix and install via:

  • VSCode: Extensions β†’ Install from VSIX
  • Command line: code --install-extension augment-proxy-manager-2.1.0.vsix

πŸš€ Upgrade Notes

No breaking changes. Simply update to v2.1.0 to get all new features.

πŸ“ Full Changelog

See CHANGELOG.md for complete version history.


Previous Release: v2.0.0
Repository: LegnaOS/VSC-Augment-Proxy-Manager