Commit Graph

9 Commits

  • Add FunctionCallIndex to ConvertCliToOpenAIParams and enhance tool call handling
    - Introduced `FunctionCallIndex` to track and manage function call indices within `ConvertCliToOpenAIParams`.
    - Enhanced handling for `response.completed` and `response.output_item.done` data types to support tool call scenarios.
    - Improved logic for restoring original tool names and setting function arguments during response parsing.
  • Add reverse mappings for original tool names and improve error logging
    - Introduced reverse mapping logic for tool names in translators to restore original names when shortened.
    - Enhanced error handling by logging API response errors consistently across handlers.
    - Refactored request and response loggers to include API error details, improving debugging capabilities.
    - Integrated robust tool name shortening and uniqueness mechanisms for OpenAI, Gemini, and Claude requests.
    - Improved handler retry logic to properly capture and respond to errors.
  • Refactor translator packages for OpenAI Chat Completions
    - Renamed `openai` packages to `chat_completions` across translator modules.
    - Introduced `openai_responses_handlers` with handlers for `/v1/models` and OpenAI-compatible chat completions endpoints.
    - Updated constants and registry identifiers for OpenAI response type.
    - Simplified request/response conversions and added detailed retry/error handling.
    - Added `golang.org/x/crypto` for additional cryptographic functions.
  • Add management API handlers for config and auth file management
    - Implemented CRUD operations for authentication files.
    - Added endpoints for managing API keys, quotas, proxy settings, and other configurations.
    - Enhanced management access with robust validation, remote access control, and persistence support.
    - Updated README with new configuration details.
    
    Fixed OpenAI Chat Completions for codex
  • Suppress debug logs for model routing and ignore empty tools arrays
    - Comment out verbose routing logs in the API server to reduce noise.
    - Remove the `tools` field from Qwen client requests when it is an empty array.
    - Add guards in Claude, Codex, Gemini‑CLI, and Gemini translators to skip tool conversion when the `tools` array is empty, preventing unnecessary payload modifications.