librechat.yaml
file. I tried out my creds using a curl and it worked. I even tried to hardcode the keys into the file, but it wouldn't get the Portkey endpoint to show up on my end. I may be getting the model name wrong, but am not sure. I am trying to integrate it with a virtual key that has access to AWS Bedrock.custom:
- name: "Portkey"
baseURL: "${PORTKEY_GATEWAY_URL}"
headers:
x-portkey-api-key: "${PORTKEY_API_KEY}"
x-portkey-virtual-key: "${PORTKEY_VIRTUAL_KEY}"
models:
default: ["anthropic.claude-v2:1"]
fetch: true
titleConvo: true
titleModel: "current_model"
summarize: false
summaryModel: "current_model"
forcePrompt: false
modelDisplayLabel: "Portkey"
PORTKEY_BASE_URL
in the .env
file should be PORTKEY_GATEWAY_URL
librechat.yaml
, you need to pass the apiKey
param with a dummy value.LibreChat | 2024-10-04 14:39:39 error: [handleAbortError] AI response error; aborting request: 400 bedrock error: Malformed input request: #: subject must not be valid against schema {"required":["messages"]}#: required key [max_tokens] not found#: extraneous key [metadata] is not permitted, please reformat your input and try again.
custom: - name: "Portkey" apiKey: 'DUMMY' baseURL: '${PORTKEY_BASE_URL}' headers: x-portkey-api-key: '${PORTKEY_API_KEY}' x-portkey-virtual-key: 'openai-asd-3dsaeb', x-portkey-metadata: '{"_user": "Tim"}' ...
2024-11-13 21:08:53 info: Custom config file loaded: 2024-11-13 21:08:53 info: { "version": "1.1.7", "cache": true, "endpoints": { "custom": [ { "name": "Portkey", "apikey": "dummy", "baseURL": "https://api.portkey.ai/v1", "headers": { "x-portkey-api-key": "....", "x-portkey-virtual-key": "...." }, "models": { "default": [ "gemini-1.5-pro" ], "fetch": true }, "titleConvo": true, "titleModel": "current_model", "summarize": false, "summaryModel": "current_model", "forcePrompt": false, "modelDisplayLabel": "Portkey:OpenAI" } ] } }
sudo /usr/local/bin/docker-compose -f ./deploy-compose.yml -f ./deploy-compose.override.yml up -d
apiKey
and not apikey
https://github.com/LibreChat-AI/librechat.ai/pull/167