feat: add dynamic Bedrock model discovery

Add automatic discovery of AWS Bedrock models using ListFoundationModels API.
When AWS credentials are detected, models that support streaming and text output
are automatically discovered and made available.

- Add @aws-sdk/client-bedrock dependency
- Add discoverBedrockModels() with caching (default 1 hour)
- Add resolveImplicitBedrockProvider() for auto-registration
- Add BedrockDiscoveryConfig for optional filtering by provider/region
- Filter to active, streaming, text-output models only
- Update docs/bedrock.md with auto-discovery documentation
This commit is contained in:
Alex Fallah authored and Peter Steinberger committed 2026-01-24 01:15:06 +00:00
1 parent c66b1fd18b
commit 8effb557d5
11 files changed
+944 -3

No files matched your search

+8
View File
@@ -43,7 +43,15 @@ export type ModelProviderConfig = {
models: ModelDefinitionConfig[];
};
export type BedrockDiscoveryConfig = {
enabled?: boolean;
region?: string;
providerFilter?: string[];
refreshInterval?: number;
};
export type ModelsConfig = {
mode?: "merge" | "replace";
providers?: Record<string, ModelProviderConfig>;
bedrockDiscovery?: BedrockDiscoveryConfig;
};