The configuration process can be divided into 5 core steps:
- environmental preparation: By
git clone https://github.com/tingxifa/claude_proxy.gitGet the latest code - Key Configuration:: Editorial
claude_proxy.shscript in theAPI_KEYvariable, filled with a valid Claude API key (the dummy-key of the local Ollama service can be used for testing) - Endpoint setup: Modification
OPEN_AI_URLfor the local model service address (e.g., Ollama's defaulthttp://localhost:11434/v1) - model mapping: By
OPEN_MODELvariable specifies the name of the mapping (e.g., mapping Claude Haiku to thegpt-4o-mini) - service activation: Implementation
chmod +x claude_proxy.sh && ./claude_proxy.shEnabling Agents
Debugging is recommended to open the terminal log to observe the request/response data flow , if you use VS Code and other IDEs can be used with the REST Client plug-in for visualization testing.
This answer comes from the articleClaude Proxy: Proxy tool to convert Claude API to OpenAI formatThe































