mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-19 16:56:12 +01:00
👤 feat: AWS Bedrock Custom Inference Profiles (#11308)
* feat: add support for inferenceProfiles mapping * fix: remove friendly name since api requires actual model id for validation alongside inference profile * docs: more generic description in docs * chore: address comments * chore: update peer dependency versions in package.json - Bump @aws-sdk/client-bedrock-runtime from ^3.941.0 to ^3.970.0 - Update @librechat/agents from ^3.0.78 to ^3.0.79 * fix: update @librechat/agents dependency to version 3.0.80 * test: add unit tests for inference profile configuration in initializeBedrock function - Introduced tests to validate the applicationInferenceProfile setting based on model configuration. - Ensured correct handling of environment variables and fallback scenarios for inference profile ARNs. - Added cases for empty inferenceProfiles and absence of bedrock config to confirm expected behavior. * fix: update bedrock endpoint schema reference in config - Changed the bedrock endpoint reference from baseEndpointSchema to bedrockEndpointSchema for improved clarity and accuracy in configuration. * test: add unit tests for Bedrock endpoint configuration - Introduced tests to validate the configuration of Bedrock endpoints with models and inference profiles. - Added scenarios for both complete and minimal configurations to ensure expected behavior. - Enhanced coverage for the handling of inference profiles without a models array. --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
cc32895d13
commit
bd49693afc
10 changed files with 2081 additions and 1776 deletions
|
|
@ -446,18 +446,32 @@ endpoints:
|
|||
# AWS Bedrock Example
|
||||
# Note: Bedrock endpoint is configured via environment variables
|
||||
# bedrock:
|
||||
# # Models Configuration
|
||||
# # Specify which models are available (equivalent to BEDROCK_AWS_MODELS env variable)
|
||||
# models:
|
||||
# - "anthropic.claude-3-7-sonnet-20250219-v1:0"
|
||||
# - "anthropic.claude-3-5-sonnet-20241022-v2:0"
|
||||
#
|
||||
# # Inference Profiles Configuration
|
||||
# # Maps model IDs to their inference profile ARNs
|
||||
# # IMPORTANT: The model ID (key) MUST be a valid AWS Bedrock model ID that you've added to the models list above
|
||||
# # The ARN (value) is the inference profile you wish to map to for that model
|
||||
# # Both the model ID and ARN are sent to AWS - the model ID for validation/metadata, the ARN for routing
|
||||
# inferenceProfiles:
|
||||
# "us.anthropic.claude-sonnet-4-20250514-v1:0": "${BEDROCK_INFERENCE_PROFILE_CLAUDE_SONNET}"
|
||||
# "anthropic.claude-3-7-sonnet-20250219-v1:0": "arn:aws:bedrock:us-west-2:123456789012:application-inference-profile/abc123"
|
||||
#
|
||||
# # Guardrail Configuration
|
||||
# guardrailConfig:
|
||||
# guardrailIdentifier: "your-guardrail-id"
|
||||
# guardrailVersion: "1"
|
||||
#
|
||||
#
|
||||
# # Trace behavior for debugging (optional)
|
||||
# # - "enabled": Include basic trace information about guardrail assessments
|
||||
# # - "enabled_full": Include comprehensive trace details (recommended for debugging)
|
||||
# # - "disabled": No trace information (default)
|
||||
# # Trace output is logged to application log files for compliance auditing
|
||||
# trace: "enabled"
|
||||
|
||||
# Example modelSpecs configuration showing grouping options
|
||||
# The 'group' field organizes model specs in the UI selector:
|
||||
# - If 'group' matches an endpoint name (e.g., "openAI", "groq"), the spec appears nested under that endpoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue