Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/researcher/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,19 @@ def main():
remote_image = f"{ecr_url}:{image_tag}"

# Build Docker image
# Use buildx with provenance/sbom disabled so Lambda accepts the image.
# Modern Docker Desktop (BuildKit) adds attestation manifests by default,
# which AWS Lambda rejects with "image manifest, config or layer media type is not supported".
print(f"\nBuilding Docker image for linux/amd64 with tag: {image_tag}")
run_command(
[
"docker",
"buildx",
"build",
"--platform",
"linux/amd64",
"--provenance=false",
"--sbom=false",
"-t",
local_image,
".",
Expand Down
11 changes: 8 additions & 3 deletions backend/researcher/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from dotenv import load_dotenv
from agents import Agent, RunHooks, Runner, trace
from agents import Agent, ModelSettings, RunHooks, Runner, trace
from agents.extensions.models.litellm_model import LitellmModel

# Suppress LiteLLM warnings about optional dependencies
Expand Down Expand Up @@ -84,7 +84,7 @@ async def run_research_agent(topic: str = None) -> str:
os.environ["AWS_REGION"] = region
os.environ["AWS_DEFAULT_REGION"] = region
model_name = os.environ.get(
"RESEARCHER_MODEL", "bedrock/global.openai.gpt-oss-120b-1:0"
"RESEARCHER_MODEL", "bedrock/us.amazon.nova-2-lite-v1:0"
)
model = LitellmModel(model=model_name)

Expand All @@ -109,6 +109,11 @@ async def run_research_agent(topic: str = None) -> str:
model=model,
tools=[ingest_financial_document],
mcp_servers=[playwright_mcp],
# LiteLLM's Bedrock integration rejects the `tools` param by default.
# Explicitly allow it so the agent can use tools (function + MCP).
model_settings=ModelSettings(
extra_args={"allowed_openai_params": ["tools"]}
),
)

try:
Expand Down Expand Up @@ -207,7 +212,7 @@ async def health():
"timestamp": datetime.now(UTC).isoformat(),
"debug_container": container_indicators,
"aws_region": os.environ.get("AWS_DEFAULT_REGION", "not set"),
"bedrock_model": "bedrock/amazon.nova-pro-v1:0",
"bedrock_model": "bedrock/amazon.nova-2-lite-v1:0",
"mcp_logging_enabled": MCP_LOGGING_ENABLED,
}

Expand Down