fast-agent-mcp 0.2.49__tar.gz → 0.2.51__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fast-agent-mcp might be problematic. Click here for more details.
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/PKG-INFO +4 -4
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/docker-compose.yml +3 -2
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/fastagent.config.yaml +1 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/mcp_server/Dockerfile +8 -11
- fast_agent_mcp-0.2.51/examples/tensorzero/mcp_server/pyproject.toml +11 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/hatch_build.py +1 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/pyproject.toml +7 -4
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/quickstart.py +107 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/event_progress.py +18 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/model_database.py +39 -1
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/model_factory.py +5 -3
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py +7 -8
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +7 -8
- fast_agent_mcp-0.2.51/src/mcp_agent/llm/providers/augmented_llm_groq.py +103 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_openai.py +18 -7
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +10 -15
- fast_agent_mcp-0.2.51/src/mcp_agent/llm/providers/augmented_llm_tensorzero_openai.py +127 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_xai.py +8 -8
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/google_converter.py +4 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/rich_progress.py +30 -7
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/helpers/content_helpers.py +29 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/mcp_aggregator.py +32 -1
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/.env.sample +2 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/Makefile +31 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/README.md +55 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/agent.py +35 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/demo_images/crab.png +0 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/docker-compose.yml +105 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/fastagent.config.yaml +19 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/image_demo.py +67 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/mcp_server/.python-version +1 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/mcp_server/Dockerfile +25 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/mcp_server/entrypoint.sh +35 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/mcp_server/mcp_server.py +31 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/mcp_server/pyproject.toml +11 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/simple_agent.py +25 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/tensorzero_config/system_schema.json +29 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +11 -0
- fast_agent_mcp-0.2.51/src/mcp_agent/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +35 -0
- fast_agent_mcp-0.2.49/src/mcp_agent/llm/providers/augmented_llm_groq.py +0 -30
- fast_agent_mcp-0.2.49/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -441
- fast_agent_mcp-0.2.49/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -201
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/.gitignore +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/LICENSE +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/README.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/bedrock/fast-agent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/custom-agents/agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/custom-agents/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/mcp-filtering/test_mcp_filtering.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/vision-examples/cat.png +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/base_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/iterative_planner.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/app.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/go.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/server_helpers.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/commands/url_parser.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/constants.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/main.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/config.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/console.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/context.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/agent_app.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/agent_types.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/direct_decorators.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/direct_factory.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/enhanced_prompt.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/fastagent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/interactive_prompt.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/mcp_content.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/mermaid_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/request_params.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/usage_display.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/executor/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/executor/executor.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/elicitation_form.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/elicitation_forms.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/elicitation_handler.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/elicitation_state.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/form_fields.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/handler.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/simple_form.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/augmented_llm.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/augmented_llm_silent.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_bedrock.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/usage_tracking.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/events.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/listeners.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/logger.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/logging/transport.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/elicitation_factory.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/elicitation_handlers.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/hf_auth.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/mcp_agent_client_session.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp_server/__init__.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp_server/agent_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/progress_display.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/py.typed +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/tools/tool_definition.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/ui/console_display.py +0 -0
- {fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/ui/console_display_legacy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fast-agent-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.51
|
|
4
4
|
Summary: Define, Prompt and Test MCP enabled Agents and Workflows
|
|
5
5
|
Author-email: Shaun Smith <fastagent@llmindset.co.uk>
|
|
6
6
|
License: Apache License
|
|
@@ -208,8 +208,8 @@ License-File: LICENSE
|
|
|
208
208
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
209
209
|
Classifier: Operating System :: OS Independent
|
|
210
210
|
Classifier: Programming Language :: Python :: 3
|
|
211
|
-
Requires-Python: >=3.
|
|
212
|
-
Requires-Dist: a2a-sdk>=0.
|
|
211
|
+
Requires-Python: >=3.13
|
|
212
|
+
Requires-Dist: a2a-sdk>=0.3.0
|
|
213
213
|
Requires-Dist: aiohttp>=3.11.13
|
|
214
214
|
Requires-Dist: anthropic>=0.59.0
|
|
215
215
|
Requires-Dist: azure-identity>=1.14.0
|
|
@@ -232,7 +232,7 @@ Requires-Dist: pydantic>=2.10.4
|
|
|
232
232
|
Requires-Dist: pyperclip>=1.9.0
|
|
233
233
|
Requires-Dist: pyyaml>=6.0.2
|
|
234
234
|
Requires-Dist: rich>=14.1.0
|
|
235
|
-
Requires-Dist: tensorzero>=2025.
|
|
235
|
+
Requires-Dist: tensorzero>=2025.7.5
|
|
236
236
|
Requires-Dist: typer>=0.15.1
|
|
237
237
|
Provides-Extra: azure
|
|
238
238
|
Requires-Dist: azure-identity>=1.14.0; extra == 'azure'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
FROM python:3.12-slim
|
|
2
|
-
|
|
3
2
|
WORKDIR /app
|
|
4
3
|
|
|
5
4
|
RUN apt-get update && apt-get install -y curl wget && \
|
|
@@ -9,20 +8,18 @@ RUN apt-get update && apt-get install -y curl wget && \
|
|
|
9
8
|
|
|
10
9
|
RUN pip install uv
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
COPY
|
|
14
|
-
COPY
|
|
15
|
-
COPY README.md /app/
|
|
11
|
+
# Copy dependency files only
|
|
12
|
+
COPY pyproject.toml /tmp/
|
|
13
|
+
#COPY uv.lock /tmp/
|
|
16
14
|
|
|
15
|
+
# Install dependencies
|
|
16
|
+
WORKDIR /tmp
|
|
17
17
|
RUN uv pip install --system .
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
RUN chmod +x /app/entrypoint.sh
|
|
19
|
+
# Switch back to /app (this will be overridden by volume mount)
|
|
20
|
+
WORKDIR /app
|
|
23
21
|
|
|
22
|
+
# These files will come from the volume mount at runtime
|
|
24
23
|
EXPOSE 8000
|
|
25
|
-
|
|
26
24
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
27
|
-
|
|
28
25
|
CMD ["uvicorn", "mcp_server:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
@@ -29,6 +29,7 @@ class CustomBuildHook(BuildHookInterface):
|
|
|
29
29
|
# examples/mcp/state-transfer -> src/mcp_agent/resources/examples/mcp/state-transfer
|
|
30
30
|
"examples/mcp/state-transfer": "src/mcp_agent/resources/examples/mcp/state-transfer",
|
|
31
31
|
"examples/mcp/elicitations": "src/mcp_agent/resources/examples/mcp/elicitations",
|
|
32
|
+
"examples/tensorzero": "src/mcp_agent/resources/examples/tensorzero",
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
print("Fast-agent build: Copying examples to resources...")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fast-agent-mcp"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.51"
|
|
4
4
|
description = "Define, Prompt and Test MCP enabled Agents and Workflows"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -12,7 +12,7 @@ classifiers = [
|
|
|
12
12
|
"License :: OSI Approved :: Apache Software License",
|
|
13
13
|
"Operating System :: OS Independent"
|
|
14
14
|
]
|
|
15
|
-
requires-python = ">=3.
|
|
15
|
+
requires-python = ">=3.13"
|
|
16
16
|
dependencies = [
|
|
17
17
|
"fastapi>=0.115.6",
|
|
18
18
|
"mcp==1.12.1",
|
|
@@ -34,9 +34,9 @@ dependencies = [
|
|
|
34
34
|
"opentelemetry-instrumentation-mcp>=0.43.1; python_version >= '3.10' and python_version < '4.0'",
|
|
35
35
|
"google-genai>=1.27.0",
|
|
36
36
|
"opentelemetry-instrumentation-google-genai>=0.3b0",
|
|
37
|
-
"tensorzero>=2025.
|
|
37
|
+
"tensorzero>=2025.7.5",
|
|
38
38
|
"deprecated>=1.2.18",
|
|
39
|
-
"a2a-sdk>=0.
|
|
39
|
+
"a2a-sdk>=0.3.0",
|
|
40
40
|
"email-validator>=2.2.0",
|
|
41
41
|
"pyperclip>=1.9.0",
|
|
42
42
|
]
|
|
@@ -136,3 +136,6 @@ ignore=["E501"]
|
|
|
136
136
|
# More lenient settings for existing code
|
|
137
137
|
[tool.ruff.lint.per-file-ignores]
|
|
138
138
|
"tests/*" = ["ANN"] # Don't require type annotations in tests
|
|
139
|
+
|
|
140
|
+
[tool.uv.workspace]
|
|
141
|
+
members = ["examples/tensorzero/mcp_server"]
|
|
@@ -76,6 +76,25 @@ EXAMPLE_TYPES = {
|
|
|
76
76
|
],
|
|
77
77
|
"create_subdir": True,
|
|
78
78
|
},
|
|
79
|
+
"tensorzero": {
|
|
80
|
+
"description": "A complete example showcasing the TensorZero integration.\n"
|
|
81
|
+
"Includes the T0 Gateway, an MCP server, an interactive agent, and \n"
|
|
82
|
+
"multi-modal functionality.",
|
|
83
|
+
"files": [
|
|
84
|
+
".env.sample",
|
|
85
|
+
"Makefile",
|
|
86
|
+
"README.md",
|
|
87
|
+
"agent.py",
|
|
88
|
+
"docker-compose.yml",
|
|
89
|
+
"fastagent.config.yaml",
|
|
90
|
+
"image_demo.py",
|
|
91
|
+
"simple_agent.py",
|
|
92
|
+
"mcp_server/",
|
|
93
|
+
"demo_images/",
|
|
94
|
+
"tensorzero_config/"
|
|
95
|
+
],
|
|
96
|
+
"create_subdir": True,
|
|
97
|
+
},
|
|
79
98
|
}
|
|
80
99
|
|
|
81
100
|
|
|
@@ -225,6 +244,27 @@ def copy_example_files(example_type: str, target_dir: Path, force: bool = False)
|
|
|
225
244
|
return created
|
|
226
245
|
|
|
227
246
|
|
|
247
|
+
def copy_project_template(source_dir: Path, dest_dir: Path, console: Console, force: bool = False):
|
|
248
|
+
"""
|
|
249
|
+
Recursively copies a project template directory.
|
|
250
|
+
This is a helper to handle project-based quickstarts like TensorZero.
|
|
251
|
+
"""
|
|
252
|
+
if dest_dir.exists():
|
|
253
|
+
if force:
|
|
254
|
+
console.print(f"[yellow]--force specified. Removing existing directory: {dest_dir}[/yellow]")
|
|
255
|
+
shutil.rmtree(dest_dir)
|
|
256
|
+
else:
|
|
257
|
+
console.print(f"[bold yellow]Directory '{dest_dir.name}' already exists.[/bold yellow] Use --force to overwrite.")
|
|
258
|
+
return False
|
|
259
|
+
|
|
260
|
+
try:
|
|
261
|
+
shutil.copytree(source_dir, dest_dir)
|
|
262
|
+
return True
|
|
263
|
+
except Exception as e:
|
|
264
|
+
console.print(f"[red]Error copying project template: {e}[/red]")
|
|
265
|
+
return False
|
|
266
|
+
|
|
267
|
+
|
|
228
268
|
def show_overview() -> None:
|
|
229
269
|
"""Display an overview of available examples in a nicely formatted table."""
|
|
230
270
|
console.print("\n[bold cyan]fast-agent quickstarts[/bold cyan]")
|
|
@@ -397,6 +437,73 @@ def _show_completion_message(example_type: str, created: list[str]) -> None:
|
|
|
397
437
|
console.print("\n[yellow]No files were created.[/yellow]")
|
|
398
438
|
|
|
399
439
|
|
|
440
|
+
@app.command(name="tensorzero", help="Create the TensorZero integration example project.")
|
|
441
|
+
def tensorzero(
|
|
442
|
+
directory: Path = typer.Argument(
|
|
443
|
+
Path("."),
|
|
444
|
+
help="Directory where the 'tensorzero' project folder will be created.",
|
|
445
|
+
),
|
|
446
|
+
force: bool = typer.Option(False, "--force", "-f", help="Force overwrite if project directory exists"),
|
|
447
|
+
):
|
|
448
|
+
"""Create the TensorZero project example."""
|
|
449
|
+
console.print("[bold green]Setting up the TensorZero quickstart example...[/bold green]")
|
|
450
|
+
|
|
451
|
+
dest_project_dir = directory.resolve() / "tensorzero"
|
|
452
|
+
|
|
453
|
+
# --- Find Source Directory ---
|
|
454
|
+
from importlib.resources import files
|
|
455
|
+
try:
|
|
456
|
+
# This path MUST match the "to" path from hatch_build.py
|
|
457
|
+
source_dir = files("mcp_agent").joinpath("resources").joinpath("examples").joinpath("tensorzero")
|
|
458
|
+
if not source_dir.is_dir():
|
|
459
|
+
raise FileNotFoundError # Fallback to dev mode if resource isn't a dir
|
|
460
|
+
except (ImportError, ModuleNotFoundError, FileNotFoundError):
|
|
461
|
+
console.print("[yellow]Package resources not found. Falling back to development mode.[/yellow]")
|
|
462
|
+
# This path is relative to the project root in a development environment
|
|
463
|
+
source_dir = Path(__file__).parent.parent.parent.parent / "examples" / "tensorzero"
|
|
464
|
+
|
|
465
|
+
if not source_dir.exists() or not source_dir.is_dir():
|
|
466
|
+
console.print(f"[red]Error: Source project directory not found at '{source_dir}'[/red]")
|
|
467
|
+
raise typer.Exit(1)
|
|
468
|
+
|
|
469
|
+
console.print(f"Source directory: [dim]{source_dir}[/dim]")
|
|
470
|
+
console.print(f"Destination: [dim]{dest_project_dir}[/dim]")
|
|
471
|
+
|
|
472
|
+
# --- Copy Project and Show Message ---
|
|
473
|
+
if copy_project_template(source_dir, dest_project_dir, console, force):
|
|
474
|
+
console.print(
|
|
475
|
+
f"\n[bold green]✅ Success![/bold green] Your TensorZero project has been created in: [cyan]{dest_project_dir}[/cyan]"
|
|
476
|
+
)
|
|
477
|
+
console.print("\n[bold yellow]Next Steps:[/bold yellow]")
|
|
478
|
+
console.print("\n1. [bold]Navigate to your new project directory:[/bold]")
|
|
479
|
+
console.print(f" [cyan]cd {dest_project_dir.relative_to(Path.cwd())}[/cyan]")
|
|
480
|
+
|
|
481
|
+
console.print("\n2. [bold]Set up your API keys:[/bold]")
|
|
482
|
+
console.print(" [cyan]cp .env.sample .env[/cyan]")
|
|
483
|
+
console.print(
|
|
484
|
+
" [dim]Then, open the new '.env' file and add your OpenAI or Anthropic API key.[/dim]"
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
console.print("\n3. [bold]Start the required services (TensorZero Gateway & MCP Server):[/bold]")
|
|
488
|
+
console.print(" [cyan]docker compose up --build -d[/cyan]")
|
|
489
|
+
console.print(
|
|
490
|
+
" [dim](This builds and starts the necessary containers in the background)[/dim]"
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
console.print("\n4. [bold]Run the interactive agent:[/bold]")
|
|
494
|
+
console.print(" [cyan]make agent[/cyan] (or `uv run agent.py`)")
|
|
495
|
+
console.print("\nEnjoy exploring the TensorZero integration with fast-agent! ✨")
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
@app.command(name="t0", help="Alias for the TensorZero quickstart.", hidden=True)
|
|
499
|
+
def t0_alias(
|
|
500
|
+
directory: Path = typer.Argument(Path("."), help="Directory for the 'tensorzero' project folder."),
|
|
501
|
+
force: bool = typer.Option(False, "--force", "-f", help="Force overwrite"),
|
|
502
|
+
):
|
|
503
|
+
"""Alias for the `tensorzero` command."""
|
|
504
|
+
tensorzero(directory, force)
|
|
505
|
+
|
|
506
|
+
|
|
400
507
|
@app.callback(invoke_without_command=True)
|
|
401
508
|
def main(ctx: typer.Context) -> None:
|
|
402
509
|
"""Quickstart applications for fast-agent."""
|
|
@@ -20,6 +20,7 @@ class ProgressAction(str, Enum):
|
|
|
20
20
|
PLANNING = "Planning"
|
|
21
21
|
READY = "Ready"
|
|
22
22
|
CALLING_TOOL = "Calling Tool"
|
|
23
|
+
TOOL_PROGRESS = "Tool Progress"
|
|
23
24
|
UPDATED = "Updated"
|
|
24
25
|
FINISHED = "Finished"
|
|
25
26
|
SHUTDOWN = "Shutdown"
|
|
@@ -35,6 +36,8 @@ class ProgressEvent(BaseModel):
|
|
|
35
36
|
details: Optional[str] = None
|
|
36
37
|
agent_name: Optional[str] = None
|
|
37
38
|
streaming_tokens: Optional[str] = None # Special field for streaming token count
|
|
39
|
+
progress: Optional[float] = None # Current progress value
|
|
40
|
+
total: Optional[float] = None # Total value for progress calculation
|
|
38
41
|
|
|
39
42
|
def __str__(self) -> str:
|
|
40
43
|
"""Format the progress event for display."""
|
|
@@ -86,6 +89,12 @@ def convert_log_event(event: Event) -> Optional[ProgressEvent]:
|
|
|
86
89
|
details = f"{server_name} ({tool_name})"
|
|
87
90
|
else:
|
|
88
91
|
details = f"{server_name}"
|
|
92
|
+
|
|
93
|
+
# For TOOL_PROGRESS, use progress message if available, otherwise keep default
|
|
94
|
+
if progress_action == ProgressAction.TOOL_PROGRESS:
|
|
95
|
+
progress_message = event_data.get("details", "")
|
|
96
|
+
if progress_message: # Only override if message is non-empty
|
|
97
|
+
details = progress_message
|
|
89
98
|
|
|
90
99
|
elif "augmented_llm" in namespace:
|
|
91
100
|
model = event_data.get("model", "")
|
|
@@ -104,10 +113,19 @@ def convert_log_event(event: Event) -> Optional[ProgressEvent]:
|
|
|
104
113
|
if progress_action == ProgressAction.STREAMING:
|
|
105
114
|
streaming_tokens = event_data.get("details", "")
|
|
106
115
|
|
|
116
|
+
# Extract progress data for TOOL_PROGRESS actions
|
|
117
|
+
progress = None
|
|
118
|
+
total = None
|
|
119
|
+
if progress_action == ProgressAction.TOOL_PROGRESS:
|
|
120
|
+
progress = event_data.get("progress")
|
|
121
|
+
total = event_data.get("total")
|
|
122
|
+
|
|
107
123
|
return ProgressEvent(
|
|
108
124
|
action=ProgressAction(progress_action),
|
|
109
125
|
target=target or "unknown",
|
|
110
126
|
details=details,
|
|
111
127
|
agent_name=event_data.get("agent_name"),
|
|
112
128
|
streaming_tokens=streaming_tokens,
|
|
129
|
+
progress=progress,
|
|
130
|
+
total=total,
|
|
113
131
|
)
|
|
@@ -22,6 +22,12 @@ class ModelParameters(BaseModel):
|
|
|
22
22
|
tokenizes: List[str]
|
|
23
23
|
"""List of supported content types for tokenization"""
|
|
24
24
|
|
|
25
|
+
json_mode: None | str = "schema"
|
|
26
|
+
"""Structured output style. 'schema', 'object' or None for unsupported """
|
|
27
|
+
|
|
28
|
+
reasoning: None | str = None
|
|
29
|
+
"""Reasoning output style. 'tags' if enclosed in <thinking> tags, 'none' if not used"""
|
|
30
|
+
|
|
25
31
|
|
|
26
32
|
class ModelDatabase:
|
|
27
33
|
"""Centralized model configuration database"""
|
|
@@ -87,6 +93,13 @@ class ModelDatabase:
|
|
|
87
93
|
QWEN_STANDARD = ModelParameters(
|
|
88
94
|
context_window=32000, max_output_tokens=8192, tokenizes=QWEN_MULTIMODAL
|
|
89
95
|
)
|
|
96
|
+
QWEN3_REASONER = ModelParameters(
|
|
97
|
+
context_window=131072,
|
|
98
|
+
max_output_tokens=16384,
|
|
99
|
+
tokenizes=TEXT_ONLY,
|
|
100
|
+
json_mode="object",
|
|
101
|
+
reasoning="tags",
|
|
102
|
+
)
|
|
90
103
|
|
|
91
104
|
FAST_AGENT_STANDARD = ModelParameters(
|
|
92
105
|
context_window=1000000, max_output_tokens=100000, tokenizes=TEXT_ONLY
|
|
@@ -107,7 +120,9 @@ class ModelDatabase:
|
|
|
107
120
|
OPENAI_O3_MINI_SERIES = ModelParameters(
|
|
108
121
|
context_window=200000, max_output_tokens=100000, tokenizes=TEXT_ONLY
|
|
109
122
|
)
|
|
110
|
-
|
|
123
|
+
OPENAI_GPT_OSS_SERIES = ModelParameters(
|
|
124
|
+
context_window=131072, max_output_tokens=32766, tokenizes=TEXT_ONLY, json_mode="object"
|
|
125
|
+
)
|
|
111
126
|
# TODO update to 32000
|
|
112
127
|
ANTHROPIC_OPUS_4_VERSIONED = ModelParameters(
|
|
113
128
|
context_window=200000, max_output_tokens=32000, tokenizes=ANTHROPIC_MULTIMODAL
|
|
@@ -125,6 +140,13 @@ class ModelDatabase:
|
|
|
125
140
|
context_window=65536, max_output_tokens=32768, tokenizes=TEXT_ONLY
|
|
126
141
|
)
|
|
127
142
|
|
|
143
|
+
DEEPSEEK_DISTILL = ModelParameters(
|
|
144
|
+
context_window=131072,
|
|
145
|
+
max_output_tokens=131072,
|
|
146
|
+
tokenizes=TEXT_ONLY,
|
|
147
|
+
json_mode="object",
|
|
148
|
+
reasoning="tags",
|
|
149
|
+
)
|
|
128
150
|
GEMINI_2_5_PRO = ModelParameters(
|
|
129
151
|
context_window=2097152, max_output_tokens=8192, tokenizes=GOOGLE_MULTIMODAL
|
|
130
152
|
)
|
|
@@ -214,6 +236,10 @@ class ModelDatabase:
|
|
|
214
236
|
"grok-3-fast": GROK_3,
|
|
215
237
|
"grok-3-mini-fast": GROK_3,
|
|
216
238
|
"moonshotai/kimi-k2-instruct": KIMI_MOONSHOT,
|
|
239
|
+
"qwen/qwen3-32b": QWEN3_REASONER,
|
|
240
|
+
"deepseek-r1-distill-llama-70b": DEEPSEEK_DISTILL,
|
|
241
|
+
"openai/gpt-oss-120b": OPENAI_GPT_OSS_SERIES,
|
|
242
|
+
"openai/gpt-oss-20b": OPENAI_GPT_OSS_SERIES,
|
|
217
243
|
}
|
|
218
244
|
|
|
219
245
|
@classmethod
|
|
@@ -239,6 +265,18 @@ class ModelDatabase:
|
|
|
239
265
|
params = cls.get_model_params(model)
|
|
240
266
|
return params.tokenizes if params else None
|
|
241
267
|
|
|
268
|
+
@classmethod
|
|
269
|
+
def get_json_mode(cls, model: str) -> str | None:
|
|
270
|
+
"""Get supported json mode (structured output) for a model"""
|
|
271
|
+
params = cls.get_model_params(model)
|
|
272
|
+
return params.json_mode if params else None
|
|
273
|
+
|
|
274
|
+
@classmethod
|
|
275
|
+
def get_reasoning(cls, model: str) -> str | None:
|
|
276
|
+
"""Get supported reasoning output style for a model"""
|
|
277
|
+
params = cls.get_model_params(model)
|
|
278
|
+
return params.reasoning if params else None
|
|
279
|
+
|
|
242
280
|
@classmethod
|
|
243
281
|
def get_default_max_tokens(cls, model: str) -> int:
|
|
244
282
|
"""Get default max_tokens for RequestParams based on model"""
|
|
@@ -22,7 +22,7 @@ from mcp_agent.llm.providers.augmented_llm_google_oai import GoogleOaiAugmentedL
|
|
|
22
22
|
from mcp_agent.llm.providers.augmented_llm_groq import GroqAugmentedLLM
|
|
23
23
|
from mcp_agent.llm.providers.augmented_llm_openai import OpenAIAugmentedLLM
|
|
24
24
|
from mcp_agent.llm.providers.augmented_llm_openrouter import OpenRouterAugmentedLLM
|
|
25
|
-
from mcp_agent.llm.providers.
|
|
25
|
+
from mcp_agent.llm.providers.augmented_llm_tensorzero_openai import TensorZeroOpenAIAugmentedLLM
|
|
26
26
|
from mcp_agent.llm.providers.augmented_llm_xai import XAIAugmentedLLM
|
|
27
27
|
from mcp_agent.mcp.interfaces import AugmentedLLMProtocol
|
|
28
28
|
|
|
@@ -39,7 +39,7 @@ LLMClass = Union[
|
|
|
39
39
|
Type[SlowLLM],
|
|
40
40
|
Type[DeepSeekAugmentedLLM],
|
|
41
41
|
Type[OpenRouterAugmentedLLM],
|
|
42
|
-
Type[
|
|
42
|
+
Type[TensorZeroOpenAIAugmentedLLM],
|
|
43
43
|
Type[GoogleNativeAugmentedLLM],
|
|
44
44
|
Type[GenericAugmentedLLM],
|
|
45
45
|
Type[AzureOpenAIAugmentedLLM],
|
|
@@ -144,6 +144,8 @@ class ModelFactory:
|
|
|
144
144
|
"gemini25": "gemini-2.5-flash-preview-05-20",
|
|
145
145
|
"gemini25pro": "gemini-2.5-pro-preview-05-06",
|
|
146
146
|
"kimi": "groq.moonshotai/kimi-k2-instruct",
|
|
147
|
+
"gpt-oss": "groq.openai/gpt-oss-120b",
|
|
148
|
+
"gpt-oss-20b": "groq.openai/gpt-oss-20b",
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
# Mapping of providers to their LLM classes
|
|
@@ -157,7 +159,7 @@ class ModelFactory:
|
|
|
157
159
|
Provider.GOOGLE: GoogleNativeAugmentedLLM,
|
|
158
160
|
Provider.XAI: XAIAugmentedLLM,
|
|
159
161
|
Provider.OPENROUTER: OpenRouterAugmentedLLM,
|
|
160
|
-
Provider.TENSORZERO:
|
|
162
|
+
Provider.TENSORZERO: TensorZeroOpenAIAugmentedLLM,
|
|
161
163
|
Provider.AZURE: AzureOpenAIAugmentedLLM,
|
|
162
164
|
Provider.ALIYUN: AliyunAugmentedLLM,
|
|
163
165
|
Provider.BEDROCK: BedrockAugmentedLLM,
|
{fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py
RENAMED
|
@@ -12,15 +12,14 @@ class AliyunAugmentedLLM(OpenAIAugmentedLLM):
|
|
|
12
12
|
|
|
13
13
|
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
|
|
14
14
|
"""Initialize Aliyun-specific default parameters"""
|
|
15
|
+
# Get base defaults from parent (includes ModelDatabase lookup)
|
|
16
|
+
base_params = super()._initialize_default_params(kwargs)
|
|
17
|
+
|
|
18
|
+
# Override with Aliyun-specific settings
|
|
15
19
|
chosen_model = kwargs.get("model", DEFAULT_QWEN_MODEL)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
systemPrompt=self.instruction,
|
|
20
|
-
parallel_tool_calls=True,
|
|
21
|
-
max_iterations=20,
|
|
22
|
-
use_history=True,
|
|
23
|
-
)
|
|
20
|
+
base_params.model = chosen_model
|
|
21
|
+
|
|
22
|
+
return base_params
|
|
24
23
|
|
|
25
24
|
def _base_url(self) -> str:
|
|
26
25
|
base_url = None
|
|
@@ -22,15 +22,14 @@ class DeepSeekAugmentedLLM(OpenAIAugmentedLLM):
|
|
|
22
22
|
|
|
23
23
|
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
|
|
24
24
|
"""Initialize Deepseek-specific default parameters"""
|
|
25
|
+
# Get base defaults from parent (includes ModelDatabase lookup)
|
|
26
|
+
base_params = super()._initialize_default_params(kwargs)
|
|
27
|
+
|
|
28
|
+
# Override with Deepseek-specific settings
|
|
25
29
|
chosen_model = kwargs.get("model", DEFAULT_DEEPSEEK_MODEL)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
systemPrompt=self.instruction,
|
|
30
|
-
parallel_tool_calls=True,
|
|
31
|
-
max_iterations=20,
|
|
32
|
-
use_history=True,
|
|
33
|
-
)
|
|
30
|
+
base_params.model = chosen_model
|
|
31
|
+
|
|
32
|
+
return base_params
|
|
34
33
|
|
|
35
34
|
def _base_url(self) -> str:
|
|
36
35
|
base_url = None
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from typing import List, Tuple, Type, cast
|
|
2
|
+
|
|
3
|
+
from pydantic_core import from_json
|
|
4
|
+
|
|
5
|
+
from mcp_agent.core.request_params import RequestParams
|
|
6
|
+
from mcp_agent.llm.model_database import ModelDatabase
|
|
7
|
+
from mcp_agent.llm.provider_types import Provider
|
|
8
|
+
from mcp_agent.llm.providers.augmented_llm_openai import OpenAIAugmentedLLM
|
|
9
|
+
from mcp_agent.logging.logger import get_logger
|
|
10
|
+
from mcp_agent.mcp.helpers.content_helpers import get_text, split_thinking_content
|
|
11
|
+
from mcp_agent.mcp.interfaces import ModelT
|
|
12
|
+
from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
|
|
13
|
+
|
|
14
|
+
GROQ_BASE_URL = "https://api.groq.com/openai/v1"
|
|
15
|
+
DEFAULT_GROQ_MODEL = "moonshotai/kimi-k2-instruct"
|
|
16
|
+
|
|
17
|
+
### There is some big refactorings to be had quite easily here now:
|
|
18
|
+
### - combining the structured output type handling
|
|
19
|
+
### - deduplicating between this and the deepseek llm
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class GroqAugmentedLLM(OpenAIAugmentedLLM):
|
|
23
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
24
|
+
super().__init__(*args, provider=Provider.GROQ, **kwargs)
|
|
25
|
+
|
|
26
|
+
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
|
|
27
|
+
"""Initialize Groq default parameters"""
|
|
28
|
+
# Get base defaults from parent (includes ModelDatabase lookup)
|
|
29
|
+
base_params = super()._initialize_default_params(kwargs)
|
|
30
|
+
|
|
31
|
+
# Override with Groq-specific settings
|
|
32
|
+
chosen_model = kwargs.get("model", DEFAULT_GROQ_MODEL)
|
|
33
|
+
base_params.model = chosen_model
|
|
34
|
+
base_params.parallel_tool_calls = False
|
|
35
|
+
|
|
36
|
+
return base_params
|
|
37
|
+
|
|
38
|
+
async def _apply_prompt_provider_specific_structured(
|
|
39
|
+
self,
|
|
40
|
+
multipart_messages: List[PromptMessageMultipart],
|
|
41
|
+
model: Type[ModelT],
|
|
42
|
+
request_params: RequestParams | None = None,
|
|
43
|
+
) -> Tuple[ModelT | None, PromptMessageMultipart]: # noqa: F821
|
|
44
|
+
request_params = self.get_request_params(request_params)
|
|
45
|
+
|
|
46
|
+
assert self.default_request_params
|
|
47
|
+
llm_model = self.default_request_params.model or DEFAULT_GROQ_MODEL
|
|
48
|
+
json_mode: str | None = ModelDatabase.get_json_mode(llm_model)
|
|
49
|
+
if "json_object" == json_mode:
|
|
50
|
+
request_params.response_format = {"type": "json_object"}
|
|
51
|
+
|
|
52
|
+
# Get the full schema and extract just the properties
|
|
53
|
+
full_schema = model.model_json_schema()
|
|
54
|
+
properties = full_schema.get("properties", {})
|
|
55
|
+
required_fields = full_schema.get("required", [])
|
|
56
|
+
|
|
57
|
+
# Create a cleaner format description
|
|
58
|
+
format_description = "{\n"
|
|
59
|
+
for field_name, field_info in properties.items():
|
|
60
|
+
field_type = field_info.get("type", "string")
|
|
61
|
+
description = field_info.get("description", "")
|
|
62
|
+
format_description += f' "{field_name}": "{field_type}"'
|
|
63
|
+
if description:
|
|
64
|
+
format_description += f" // {description}"
|
|
65
|
+
if field_name in required_fields:
|
|
66
|
+
format_description += " // REQUIRED"
|
|
67
|
+
format_description += "\n"
|
|
68
|
+
format_description += "}"
|
|
69
|
+
|
|
70
|
+
multipart_messages[-1].add_text(
|
|
71
|
+
f"""YOU MUST RESPOND WITH A JSON OBJECT IN EXACTLY THIS FORMAT:
|
|
72
|
+
{format_description}
|
|
73
|
+
|
|
74
|
+
IMPORTANT RULES:
|
|
75
|
+
- Respond ONLY with the JSON object, no other text
|
|
76
|
+
- Do NOT include "properties" or "schema" wrappers
|
|
77
|
+
- Do NOT use code fences or markdown
|
|
78
|
+
- The response must be valid JSON that matches the format above
|
|
79
|
+
- All required fields must be included"""
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
result: PromptMessageMultipart = await self._apply_prompt_provider_specific(
|
|
83
|
+
multipart_messages, request_params
|
|
84
|
+
)
|
|
85
|
+
reasoning_mode: str | None = ModelDatabase.get_reasoning(llm_model)
|
|
86
|
+
try:
|
|
87
|
+
text = get_text(result.content[-1]) or ""
|
|
88
|
+
if "tags" == reasoning_mode:
|
|
89
|
+
_, text = split_thinking_content(text)
|
|
90
|
+
json_data = from_json(text, allow_partial=True)
|
|
91
|
+
validated_model = model.model_validate(json_data)
|
|
92
|
+
return cast("ModelT", validated_model), result
|
|
93
|
+
except ValueError as e:
|
|
94
|
+
logger = get_logger(__name__)
|
|
95
|
+
logger.warning(f"Failed to parse structured response: {str(e)}")
|
|
96
|
+
return None, result
|
|
97
|
+
|
|
98
|
+
def _base_url(self) -> str:
|
|
99
|
+
base_url = None
|
|
100
|
+
if self.context.config and self.context.config.groq:
|
|
101
|
+
base_url = self.context.config.groq.base_url
|
|
102
|
+
|
|
103
|
+
return base_url if base_url else GROQ_BASE_URL
|
{fast_agent_mcp-0.2.49 → fast_agent_mcp-0.2.51}/src/mcp_agent/llm/providers/augmented_llm_openai.py
RENAMED
|
@@ -307,6 +307,7 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
307
307
|
request_params = self.get_request_params(request_params=request_params)
|
|
308
308
|
|
|
309
309
|
responses: List[ContentBlock] = []
|
|
310
|
+
model_name = self.default_request_params.model or DEFAULT_OPENAI_MODEL
|
|
310
311
|
|
|
311
312
|
# TODO -- move this in to agent context management / agent group handling
|
|
312
313
|
messages: List[ChatCompletionMessageParam] = []
|
|
@@ -347,7 +348,6 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
347
348
|
stream = await self._openai_client().chat.completions.create(**arguments)
|
|
348
349
|
# Process the stream
|
|
349
350
|
response = await self._process_stream(stream, self.default_request_params.model)
|
|
350
|
-
|
|
351
351
|
# Track usage if response is valid and has usage data
|
|
352
352
|
if (
|
|
353
353
|
hasattr(response, "usage")
|
|
@@ -391,6 +391,14 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
391
391
|
# Convert to dict and remove None values
|
|
392
392
|
message_dict = message.model_dump()
|
|
393
393
|
message_dict = {k: v for k, v in message_dict.items() if v is not None}
|
|
394
|
+
if model_name in (
|
|
395
|
+
"deepseek-r1-distill-llama-70b",
|
|
396
|
+
"openai/gpt-oss-120b",
|
|
397
|
+
"openai/gpt-oss-20b",
|
|
398
|
+
):
|
|
399
|
+
message_dict.pop("reasoning", None)
|
|
400
|
+
message_dict.pop("channel", None)
|
|
401
|
+
|
|
394
402
|
messages.append(message_dict)
|
|
395
403
|
|
|
396
404
|
message_text = message.content
|
|
@@ -412,9 +420,8 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
412
420
|
)
|
|
413
421
|
|
|
414
422
|
tool_results = []
|
|
415
|
-
|
|
423
|
+
|
|
416
424
|
for tool_call in message.tool_calls:
|
|
417
|
-
|
|
418
425
|
self.show_tool_call(
|
|
419
426
|
available_tools,
|
|
420
427
|
tool_call.function.name,
|
|
@@ -430,7 +437,7 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
430
437
|
else from_json(tool_call.function.arguments, allow_partial=True),
|
|
431
438
|
),
|
|
432
439
|
)
|
|
433
|
-
|
|
440
|
+
|
|
434
441
|
try:
|
|
435
442
|
result = await self.call_tool(tool_call_request, tool_call.id)
|
|
436
443
|
self.show_tool_result(result)
|
|
@@ -439,10 +446,14 @@ class OpenAIAugmentedLLM(AugmentedLLM[ChatCompletionMessageParam, ChatCompletion
|
|
|
439
446
|
except Exception as e:
|
|
440
447
|
self.logger.error(f"Tool call {tool_call.id} failed with error: {e}")
|
|
441
448
|
# Still add the tool_call_id with an error result to prevent missing responses
|
|
442
|
-
error_result = CallToolResult(
|
|
449
|
+
error_result = CallToolResult(
|
|
450
|
+
content=[TextContent(type="text", text=f"Tool call failed: {str(e)}")]
|
|
451
|
+
)
|
|
443
452
|
tool_results.append((tool_call.id, error_result))
|
|
444
|
-
|
|
445
|
-
converted_messages = OpenAIConverter.convert_function_results_to_openai(
|
|
453
|
+
|
|
454
|
+
converted_messages = OpenAIConverter.convert_function_results_to_openai(
|
|
455
|
+
tool_results
|
|
456
|
+
)
|
|
446
457
|
messages.extend(converted_messages)
|
|
447
458
|
|
|
448
459
|
self.logger.debug(
|