From 70ac163b147330e71024eca3579ec5a551f201f9 Mon Sep 17 00:00:00 2001 From: Yue Deng Date: Sun, 17 Aug 2025 17:32:45 +0800 Subject: [PATCH 1/5] update default base url --- apps/run-agent/.env.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/run-agent/.env.template b/apps/run-agent/.env.template index c32f88d8..a091923b 100644 --- a/apps/run-agent/.env.template +++ b/apps/run-agent/.env.template @@ -8,15 +8,15 @@ GEMINI_API_KEY="" # Anthropic ANTHROPIC_API_KEY="" -ANTHROPIC_BASE_URL="" +ANTHROPIC_BASE_URL="https://api.anthropic.com" # openAI OPENAI_API_KEY="" -OPENAI_BASE_URL="" +OPENAI_BASE_URL="https://api.openai.com/v1" # openrouter OPENROUTER_API_KEY="" -OPENROUTER_BASE_URL="" +OPENROUTER_BASE_URL="https://openrouter.ai/api/v1" # NewAPI NEWAPI_API_KEY="" From 6680b459c598e16c3ace141ffa79f19475557ef2 Mon Sep 17 00:00:00 2001 From: Yue Deng Date: Sun, 17 Aug 2025 17:44:44 +0800 Subject: [PATCH 2/5] update .env readme --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 045b0827..1392839c 100644 --- a/README.md +++ b/README.md @@ -160,8 +160,28 @@ uv sync **Step 2:** Set up environment dependencies: +a. Set up `MiroFlow/apps/prepare-benchmark/.env` by: +```bash +## copy environment variable template and prepare yours in .env file +cd MiroFlow/apps/prepare-benchmark +cp .env.template .env +vim .env +``` Required environment variables: - `HF_TOKEN` (for downloading datasets from Hugging Face) + +Optional environment variables: +- `DATA_DIR` (Data loading directory, by default `../../data`) + + +b. Set up `MiroFlow/apps/run-agent/.env` by: +```bash +## copy environment variable template and prepare yours in .env file +cd MiroFlow/apps/run-agent +cp .env.template .env +vim .env +``` +Required environment variables: - `OPENROUTER_API_KEY` (Using OpenRouter to provide primary agent model) - `ANTHROPIC_API_KEY` (for vision tools) - `OPENAI_API_KEY` (for audio tools, intent recognition, and answer extraction) @@ -176,15 +196,6 @@ Optional environment variables: If you wish to use a different LLM as the primary agent model, you will need to provide the corresponding API keys. -```bash -## copy environment variable template and prepare yours in .env file -cd MiroFlow/apps/prepare-benchmark -cp .env.template .env -vim .env -cd MiroFlow/apps/run-agent -cp .env.template .env -vim .env -``` **Step 3:** Prepare E2B Sandbox (Optional) From 727d044ea3b25375235abacd72779766cd0e7f1a Mon Sep 17 00:00:00 2001 From: Yue Deng Date: Sun, 17 Aug 2025 21:07:08 +0800 Subject: [PATCH 3/5] fix https --- .../src/miroflow/llm/providers/claude_anthropic_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py index ca0fb4ec..a7d559f4 100644 --- a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py +++ b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py @@ -41,8 +41,8 @@ def _create_client(self, config: DictConfig): trace_id = get_trace_id() if trace_id is not None: http_client_args["headers"] = {"trace-id": trace_id} - if not OmegaConf.is_missing(config, "https_proxy"): - http_client_args["proxy"] = config.env.https_proxy + if (proxy := config.get("env.https_proxy", "???")) != "???": + http_client_args["proxy"] = proxy logger.debug(f"Info: Using proxy {http_client_args['proxy']}") if self.async_client: From c40e0b9346b80df02127534fd02c132c75ade1ef Mon Sep 17 00:00:00 2001 From: Yue Deng Date: Sun, 17 Aug 2025 21:12:14 +0800 Subject: [PATCH 4/5] lint code --- .../src/miroflow/llm/providers/claude_anthropic_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py index a7d559f4..3e86e930 100644 --- a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py +++ b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py @@ -12,7 +12,7 @@ DefaultAsyncHttpxClient, DefaultHttpxClient, ) -from omegaconf import DictConfig, OmegaConf +from omegaconf import DictConfig from tenacity import retry, stop_after_attempt, wait_fixed from miroflow.llm.provider_client_base import LLMProviderClientBase From 20ef4880725c1aa4b166dc48147dd352d3c0d7b5 Mon Sep 17 00:00:00 2001 From: Yue Deng Date: Mon, 18 Aug 2025 10:09:29 +0800 Subject: [PATCH 5/5] lint --- .../src/miroflow/llm/providers/claude_anthropic_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py index 3e86e930..2566e240 100644 --- a/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py +++ b/libs/miroflow/src/miroflow/llm/providers/claude_anthropic_client.py @@ -12,7 +12,7 @@ DefaultAsyncHttpxClient, DefaultHttpxClient, ) -from omegaconf import DictConfig +from omegaconf import DictConfig from tenacity import retry, stop_after_attempt, wait_fixed from miroflow.llm.provider_client_base import LLMProviderClientBase