Amp Server Update: Enhanced Performance and Configuration Options
Amp Server has been updated with several improvements. The latest update addresses issues related to compact errors and the inability to use Google series endpoints. The experience is now much smoother, and interested users can check out the commit for details: Add Google API proxy support and improve proxy service.
A reference configuration file is provided, allowing for different upstream proxies for each endpoint and the use of custom authorization headers. Below are examples of the .env and proxy_config.yaml configuration files.
.env Configuration File
HOST=127.0.0.1
PORT=8888
MAX_REQUEST_BODY_BYTES=104857600
# Set to a high value
CONNECT_TIMEOUT_SECS=500
REQUEST_TIMEOUT_SECS=60000
# API keys, make sure to change these
AMP_API_KEY=test-api-key-please-change-me
GOOGLE_API_KEY=test-api-key-please-change-me
# Logging level, set to debug for more logs or info for less
RUST_LOG=debugproxy_config.yaml Configuration File
endpoints:
- path: "/api/provider/openai/v1/responses"
target_url: "https://your-supported-response-endpoint/v1/responses"
method: "POST"
response_type: "stream"
custom_headers: {}
forward_request_headers:
- "authorization"
- "content-type"
- "user-agent"
- "accept"
- "accept-encoding"
forward_response_headers:
- "content-type"
- "cache-control"
enabled: true
- path: "/api/provider/anthropic/v1/messages"
target_url: "https://your-supported-v1-messages-endpoint/v1/messages"
method: "POST"
response_type: "stream"
custom_headers: {}
forward_request_headers:
- "authorization"
- "content-type"
- "user-agent"
- "accept"
- "accept-encoding"
- "anthropic-version"
- "x-api-key"
forward_response_headers:
- "content-type"
- "cache-control"
enabled: true
- path: "/api/tab/llm-proxy"
target_url: "https://ampcode.com/api/tab/llm-proxy"
method: "POST"
response_type: "sse"
custom_headers: {}
forward_request_headers:
- "authorization"
- "user-agent"
- "x-amp-feature"
- "accept-language"
- "sec-fetch-mode"
forward_response_headers:
- "alt-svc"
- "content-security-policy"
- "fireworks-backend-host"
- "fireworks-cached-prompt-tokens"
- "fireworks-deployment"
- "fireworks-generation-queue-duration"
- "fireworks-num-concurrent-requests"
- "fireworks-prefill-duration"
- "fireworks-prefill-queue-duration"
- "fireworks-prompt-tokens"
- "fireworks-sampling-options"
- "fireworks-server-time-to-first-token"
- "fireworks-speculation-matched-tokens"
- "fireworks-speculation-prompt-tokens"
- "fireworks-tokenizer-duration"
- "fireworks-tokenizer-queue-duration"
enabled: true
# Google Generative Language (gemini)
# Matches: /api/provider/google/v1beta1/publishers/google/models/<model>:generateContent
# For example: /api/provider/google/v1beta1/publishers/google/models/gemini-2.5-flash-lite-preview-09-2025:generateContent
# Captures the remainder after /models/ as "rest"; the server derives {model} = rest.split(':').next()
- path: "/api/provider/google/v1beta1/publishers/google/models/{*rest}"
target_url: "https://your-supported-google-endpoint/v1/v1beta/models/gemini-2.5-pro:generateContent"
method: "POST"
response_type: "stream"
custom_headers: {}
forward_request_headers:
- "content-type"
- "user-agent"
- "accept"
- "accept-encoding"
forward_response_headers:
- "content-type"
- "cache-control"
enabled: trueIf you have any questions or issues while using Amp Server, feel free to discuss them below. The configuration is straightforward. I've also provided executables for a few major platforms, and I plan to create an action to automate future releases, although I'm quite lazy and haven't done it yet. 😇
For the Windows 64-bit executable, you can download it from here.
You can find more discussion and the full topic here on .
via - Latest Topics (author: YougLin)
评论已关闭