Skip to content

Feature Request: Support for Multi-Language (e.g., Chinese) + Broader API Compatibility (e.g., New-API, OpenAI-Compatible Endpoints) #2

@OuOumm

Description

@OuOumm

Is your feature request related to a problem? Please describe.

First off, thanks for building Clif-Code/ClifPad – the performance, small binary size, and built-in agent are impressive. However, I’ve noticed two areas that could improve accessibility and flexibility for a wider audience:

  1. Language barrier: The UI and agent prompts appear to be English-only. For developers who are more comfortable with Chinese (or other languages), this makes it harder to use the AI agent effectively, especially when generating or explaining code in their native language.
  2. API endpoint flexibility: Currently, the project supports OpenRouter, OpenAI, Anthropic, and Ollama. But many users (especially in some regions) rely on gateway services like New-API (https://github.com/Calcium-Ion/new-api) which provide a unified, OpenAI-compatible endpoint but may require custom base URLs, API key mappings, or slightly different authentication handling.

Describe the solution you'd like

1. Multi-language support (especially Chinese)

  • Add i18n support to both the ClifPad UI (frontend strings) and the ClifCode TUI agent.
  • Allow users to select a language via config (e.g., clifcode --lang zh or a setting in ClifPad).
  • At minimum, support for Simplified Chinese (zh-CN) would be a great start. The agent should be able to receive prompts in Chinese and respond appropriately, possibly by setting the system prompt language.

2. Broader API compatibility with OpenAI-generic protocol

  • Allow users to specify any OpenAI-compatible API endpoint via configuration:
    • Custom base_url
    • Custom api_key
    • Optional override for model name mapping
  • This would support New-API, OneAPI, LiteLLM, and any self-hosted gateway that mimics the OpenAI chat completions API.
  • For ClifCode, this could be as simple as:
    [backend]
    type = "openai-compatible"
    base_url = "https://your-new-api-domain.com/v1"
    api_key = "sk-xxxx"
    model = "gpt-3.5-turbo"  # or any model exposed by the gateway
  • For ClifPad, a UI field for "Custom OpenAI-compatible URL" under AI settings.

Describe alternatives you've considered

  • Using Ollama with a Chinese model (e.g., Qwen) could solve the Chinese prompt understanding, but the UI and system prompts remain English, and it doesn't help with non-Ollama gateways.
  • Manually modifying the source code to change the API endpoint – but that’s not maintainable across updates.

Additional context

  • New-API (and similar projects) are widely used to aggregate multiple AI providers (OpenAI, Anthropic, local models) behind a single OpenAI-style API. Adding support would make Clif-Code much more usable in many developer communities.
  • For language support, even just making the agent’s system prompt localizable would be a huge step. For example:

    "You are a helpful coding assistant. Always respond in the user's language: Chinese."

Thank you for considering these improvements. I’d be happy to help test or contribute if guidance is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions