kayx23 commented on code in PR #14170: URL: https://github.com/apache/apisix/pull/14170#discussion_r4559404763
########## docs/en/latest/plugins/ai-proxy.md: ########## @@ -1433,6 +1434,222 @@ You should receive a response similar to the following: } ``` +### Proxy to Eden AI + +The following example demonstrates how you can configure the `ai-proxy` Plugin to proxy Chat Completions requests to [Eden AI](https://www.edenai.co/docs), a gateway that exposes many LLM providers behind one OpenAI-compatible API. Models are addressed as `provider/model` strings, for example `openai/gpt-4o` or `anthropic/claude-sonnet-latest`; see the [Eden AI model list](https://www.edenai.co/docs/v3/llms/listing-models) for available names. + +Obtain an Eden AI [API key](https://app.edenai.run/) and save it to an environment variable: + +```shell +export EDENAI_API_KEY=<your-api-key> Review Comment: This command is not copyable: an unquoted `<your-api-key>` is parsed by the shell as input redirection. Quote the placeholder, for example `export EDENAI_API_KEY='<your-api-key>'`, or tell readers to substitute the real value before running it. Please keep the Chinese counterpart aligned. ########## docs/en/latest/plugins/ai-proxy.md: ########## @@ -89,7 +89,7 @@ When `provider` is set to `bedrock`, the Plugin expects requests in the [Bedrock | Name | Type | Required | Default | Valid values | Description | |--------------------|--------|----------|---------|------------------------------------------|-------------| -| provider | string | True | | [openai, deepseek, azure-openai, aimlapi, anthropic, openrouter, gemini, vertex-ai, bedrock, openai-compatible] | LLM service provider. When set to `openai`, the Plugin sends detected Chat Completions, Responses, and Embeddings requests to the corresponding OpenAI endpoint. When set to `deepseek`, the Plugin will proxy the request to `https://api.deepseek.com/chat/completions`. When set to `aimlapi`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://api.aimlapi.com/v1/chat/completions` by default. When set to `anthropic`, the Plugin sends detected Chat Completions requests to `https://api.anthropic.com/v1/chat/completions` and native Anthropic Messages requests to `https://api.anthropic.com/v1/messages`. When set to `openrouter`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://openrouter.ai/api/v1/chat/completions` by default. When set to `gemini`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://generativelanguage.googleapis.com/v1beta/openai/chat/completions` by default. When set to `vertex-ai`, the Plugin will proxy the request to `https://aiplatform.googleapis.com` by default and requires `provider_conf` or `override`. When set to `bedrock`, the Plugin will proxy the request to the AWS Bedrock Converse API (`https://bedrock-runtime.<region>.amazonaws.com`) and signs the request with AWS SigV4. When set to `openai-compatible`, the Plugin will proxy the request to the custom endpoint configured in `override`. | +| provider | string | True | | [openai, deepseek, azure-openai, aimlapi, anthropic, openrouter, gemini, vertex-ai, bedrock, edenai, openai-compatible] | LLM service provider. When set to `openai`, the Plugin will proxy the request to `https://api.openai.com/chat/completions`. When set to `deepseek`, the Plugin will proxy the request to `https://api.deepseek.com/chat/completions`. When set to `aimlapi`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://api.aimlapi.com/v1/chat/completions` by default. When set to `anthropic`, the Plugin will proxy the request to `https://api.anthropic.com/v1/chat/completions` by default. When set to `openrouter`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://openrouter.ai/api/v1/chat/completions` by default. When set to `gemini`, the Plugin uses the OpenAI-compatible driver and proxies the request to `https://generativelanguage.googleapis.com/v1beta/openai/chat/com pletions` by default. When set to `vertex-ai`, the Plugin will proxy the request to `https://aiplatform.googleapis.com` by default and requires `provider_conf` or `override`. When set to `bedrock`, the Plugin will proxy the request to the AWS Bedrock Converse API (`https://bedrock-runtime.<region>.amazonaws.com`) and signs the request with AWS SigV4. When set to `edenai`, the Plugin proxies Chat Completions requests to `https://api.edenai.run/v3/chat/completions` by default. When set to `openai-compatible`, the Plugin will proxy the request to the custom endpoint configured in `override`. | Review Comment: This row regresses existing provider guidance while adding Eden AI. The OpenAI default base is `https://api.openai.com/v1`, and detected Chat Completions, Responses, and Embeddings requests use their protocol-specific paths; `https://api.openai.com/chat/completions` is missing `/v1`. The Anthropic provider also supports native Messages in addition to Chat Completions. Please preserve the existing per-protocol descriptions and add only the Eden AI clause. The same broad replacement appears in `ai-proxy-multi` and both Chinese pages. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
