Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/assets/templates/agent-python-strands/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dependencies = [
"aws-opentelemetry-distro ~= 0.21.0",
"bedrock-agentcore[strands-agents] >= 1.18.1, < 2.0.0",
"botocore[crt] ~= 1.43.0",
{{#if (eq modelProvider "LiteLLM")}}
"litellm < 1.106.0",
{{/if}}
"strands-agents{{#if (eq modelProvider "Anthropic")}}[anthropic]{{else}}{{#if (or (eq modelProvider "OpenAI") (eq modelProvider "OpenAICompatible"))}}[openai]{{else}}{{#if (eq modelProvider "Gemini")}}[gemini]{{else}}{{#if (eq modelProvider "LiteLLM")}}[litellm]{{/if}}{{/if}}{{/if}}{{/if}} >= 1.62.0, < 2.0.0",
]

Expand Down
3 changes: 3 additions & 0 deletions src/assets/templates/agui-python-strands/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ dependencies = [
"bedrock-agentcore[strands-agents] >= 1.18.1, < 2.0.0",
"botocore[crt] ~= 1.43.0",
"fastapi >= 0.142.0, < 1.0.0",
{{#if (eq modelProvider "LiteLLM")}}
"litellm < 1.106.0",
{{/if}}
"strands-agents{{#if (eq modelProvider "Anthropic")}}[anthropic]{{else}}{{#if (or (eq modelProvider "OpenAI") (eq modelProvider "OpenAICompatible"))}}[openai]{{else}}{{#if (eq modelProvider "Gemini")}}[gemini]{{else}}{{#if (eq modelProvider "LiteLLM")}}[litellm]{{/if}}{{/if}}{{/if}}{{/if}} >= 1.62.0, < 2.0.0",
"uvicorn >= 0.34.3, < 1.0.0",
]
Expand Down
3 changes: 3 additions & 0 deletions src/assets/templates/export-harness-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dependencies = [
"aws-opentelemetry-distro ~= 0.21.0",
"bedrock-agentcore[strands-agents] >= 1.18.1, < 2.0.0",
"botocore[crt] ~= 1.43.0",
{{#if (eq modelProvider "LiteLLM")}}
"litellm < 1.106.0",
{{/if}}
"mcp >= 1.28.1, < 2.0.0",
{{#if bedrockMantle}}"aws-bedrock-token-generator >= 1.1.0, < 2.0.0",
{{/if}}"strands-agents{{#if strandsExtras}}[{{strandsExtras}}]{{/if}} >= 1.63.0, < 2.0.0",
Expand Down
12 changes: 12 additions & 0 deletions src/core/project/templates/runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ describe("runtime templates", () => {
expect(loadPy).toContain('model_id="openai/we\\"ird"');
});

test.each<[RuntimeTemplateShortcutName, ModelProvider, boolean]>([
["agent-python-strands", "LiteLLM", true],
["agui-python-strands", "LiteLLM", true],
["agent-python-strands", "OpenAI", false],
])("%s with %s keeps litellm below 1.106.0: %p", async (template, modelProvider, capped) => {
const { appDir } = await addTemplate("my_agent", template, {
model: { modelProvider, apiKey: "test-api-key" },
});
const pyproject = await Bun.file(join(appDir, "pyproject.toml")).text();
expect(pyproject.includes(' "litellm < 1.106.0",\n "strands-agents[')).toBe(capped);
});

test("OpenAICompatible renders the OpenAI client against the API base", async () => {
const { spec, runtime, appDir } = await addTemplate("ds_agent", "agent-python-strands", {
model: {
Expand Down
Loading