feat(llm): add Amazon Bedrock as a first-class provider
Bedrock uses the Converse API (langchain-aws) and the AWS credential chain, so it has its own client like Anthropic/Google rather than the OpenAI-compatible registry. langchain-aws is an optional dependency (pip install ".[bedrock]"), lazy-imported with a clear install hint; importing the package never requires it. The model name is a Bedrock model ID / inference profile ID.
This commit is contained in:
10 files changed
+139
-2
No files matched your search
@@ -43,6 +43,10 @@ def create_llm_client(
|
||||
from .azure_client import AzureOpenAIClient
|
||||
return AzureOpenAIClient(model, base_url, **kwargs)
|
||||
|
||||
if provider_lower == "bedrock":
|
||||
from .bedrock_client import BedrockClient
|
||||
return BedrockClient(model, base_url, **kwargs)
|
||||
|
||||
from .openai_client import OpenAIClient, is_openai_compatible
|
||||
if is_openai_compatible(provider_lower):
|
||||
return OpenAIClient(model, base_url, provider=provider_lower, **kwargs)
|
||||
|
||||
Reference in new issue
Block a user