Spaces:
Running
Running
Update service env names
Browse filesFiles changed (9)
1 unmodified line234567891 unmodified lineAPI_KEY="your_openai_compatible_key" # API key for your OpenAI-compatible LLM provider.API_BASE="https://your-openai-compatible-endpoint/v1" # Base URL for the OpenAI-compatible chat-completions endpoint.MODEL_NAME="gpt-5.5" # Main model used by the agent and WebFetch summarization.SERPER_KEY_ID="your_serper_key" # https://serper.dev/JINA_API_KEYS="your_jina_key" # https://jina.ai/MINERU_TOKEN="your_mineru_token" # https://mineru.net/# Optional1 unmodified line234567891 unmodified lineAPI_KEY="your_openai_compatible_key" # API key for your OpenAI-compatible LLM provider.API_BASE="https://your-openai-compatible-endpoint/v1" # Base URL for the OpenAI-compatible chat-completions endpoint.MODEL_NAME="gpt-5.5" # Main model used by the agent and WebFetch summarization.SERPER_KEY="your_serper_key" # https://serper.dev/JINA_KEY="your_jina_key" # https://jina.ai/MINERU_TOKEN="your_mineru_token" # https://mineru.net/# Optional
29 unmodified lines303132333435363729 unmodified lines| `API_KEY` | API key for your OpenAI-compatible LLM provider. || `API_BASE` | OpenAI-compatible `/v1` endpoint. || `MODEL_NAME` | Main model used by ResearchHarness. || `SERPER_KEY_ID` | WebSearch / ScholarSearch key from <https://serper.dev/>. || `JINA_API_KEYS` | WebFetch key from <https://jina.ai/>. || `MINERU_TOKEN` | ReadPDF key from <https://mineru.net/>. |## Optional Runtime Variables29 unmodified lines303132333435363729 unmodified lines| `API_KEY` | API key for your OpenAI-compatible LLM provider. || `API_BASE` | OpenAI-compatible `/v1` endpoint. || `MODEL_NAME` | Main model used by ResearchHarness. || `SERPER_KEY` | WebSearch / ScholarSearch key from <https://serper.dev/>. || `JINA_KEY` | WebFetch key from <https://jina.ai/>. || `MINERU_TOKEN` | ReadPDF key from <https://mineru.net/>. |## Optional Runtime Variables
12 unmodified lines1314151617188 unmodified lines272829303112 unmodified linesreturn any(part.startswith("claude") for part in parts)def apply_sampling_params(request_kwargs: dict[str, Any],*,8 unmodified linesrequest_kwargs["temperature"] = temperatureif top_p is not None:request_kwargs["top_p"] = top_pif presence_penalty is not None:request_kwargs["presence_penalty"] = presence_penalty12 unmodified lines13141516171819202122232425268 unmodified lines353637383912 unmodified linesreturn any(part.startswith("claude") for part in parts)def model_rejects_presence_penalty(model_name: str) -> bool:normalized = str(model_name or "").strip().casefold()if not normalized:return Falseparts = [part for part in _MODEL_NAME_SPLIT_RE.split(normalized) if part]return any(part.startswith("gpt-5.5") for part in parts)def apply_sampling_params(request_kwargs: dict[str, Any],*,8 unmodified linesrequest_kwargs["temperature"] = temperatureif top_p is not None:request_kwargs["top_p"] = top_pif presence_penalty is not None and not model_rejects_presence_penalty(model_name):request_kwargs["presence_penalty"] = presence_penalty
289 unmodified lines29029129229329429529615 unmodified lines31231331431531631731822 unmodified lines341342343344345346347289 unmodified linesBehavior:- Calls Serper's Google Search endpoint.- Reads `SERPER_KEY_ID` at runtime.Returns:15 unmodified linesBehavior:- Calls Serper's Google Scholar endpoint.- Reads `SERPER_KEY_ID` at runtime.Returns:22 unmodified linesDependencies:- `JINA_API_KEYS`- `API_KEY`- `API_BASE`- `MODEL_NAME`289 unmodified lines29029129229329429529615 unmodified lines31231331431531631731822 unmodified lines341342343344345346347289 unmodified linesBehavior:- Calls Serper's Google Search endpoint.- Reads `SERPER_KEY` at runtime.Returns:15 unmodified linesBehavior:- Calls Serper's Google Scholar endpoint.- Reads `SERPER_KEY` at runtime.Returns:22 unmodified linesDependencies:- `JINA_KEY`- `API_KEY`- `API_BASE`- `MODEL_NAME`
129 unmodified lines13013113213313413513613713890 unmodified lines229230231232233234235236237211 unmodified lines449450451452453454455456457129 unmodified lines"gl": "us","hl": "en",}serper_key = os.getenv("SERPER_KEY_ID", "").strip()if not serper_key:return "[WebSearch] SERPER_KEY_ID is not set."headers = {"X-API-KEY": serper_key,"Content-Type": "application/json",90 unmodified linesdef google_scholar_with_serp(self, query: str):payload = {"q": query}serper_key = os.getenv("SERPER_KEY_ID", "").strip()if not serper_key:return "[ScholarSearch] SERPER_KEY_ID is not set."headers = {"X-API-KEY": serper_key,"Content-Type": "application/json",211 unmodified linesdef jina_readpage(self, url: str, runtime_deadline: Optional[float] = None) -> str:max_retries = 3timeout = 50jina_api_key = os.getenv("JINA_API_KEYS", "").strip()if not jina_api_key:return "[WebFetch] JINA_API_KEYS is not set."last_error = "unknown page-fetch error"for attempt in range(max_retries):129 unmodified lines13013113213313413513613713890 unmodified lines229230231232233234235236237211 unmodified lines449450451452453454455456457129 unmodified lines"gl": "us","hl": "en",}serper_key = os.getenv("SERPER_KEY", "").strip()if not serper_key:return "[WebSearch] SERPER_KEY is not set."headers = {"X-API-KEY": serper_key,"Content-Type": "application/json",90 unmodified linesdef google_scholar_with_serp(self, query: str):payload = {"q": query}serper_key = os.getenv("SERPER_KEY", "").strip()if not serper_key:return "[ScholarSearch] SERPER_KEY is not set."headers = {"X-API-KEY": serper_key,"Content-Type": "application/json",211 unmodified linesdef jina_readpage(self, url: str, runtime_deadline: Optional[float] = None) -> str:max_retries = 3timeout = 50jina_api_key = os.getenv("JINA_KEY", "").strip()if not jina_api_key:return "[WebFetch] JINA_KEY is not set."last_error = "unknown page-fetch error"for attempt in range(max_retries):
64 unmodified lines656667686970717264 unmodified lines]SENSITIVE_ENV_EXACT = {"API_KEY","SERPER_KEY_ID","JINA_API_KEYS","MINERU_TOKEN","OPENAI_API_KEY","ANTHROPIC_API_KEY",64 unmodified lines656667686970717264 unmodified lines]SENSITIVE_ENV_EXACT = {"API_KEY","SERPER_KEY","JINA_KEY","MINERU_TOKEN","OPENAI_API_KEY","ANTHROPIC_API_KEY",
15 unmodified lines161718192021222315 unmodified lines"API_KEY","API_BASE","MODEL_NAME","SERPER_KEY_ID","JINA_API_KEYS","MINERU_TOKEN",)IMAGE_INPUT_REL_DIR = Path("inputs") / "images"15 unmodified lines161718192021222315 unmodified lines"API_KEY","API_BASE","MODEL_NAME","SERPER_KEY","JINA_KEY","MINERU_TOKEN",)IMAGE_INPUT_REL_DIR = Path("inputs") / "images"
31 unmodified lines323334353637383931 unmodified lines| `API_KEY` | API key for your OpenAI-compatible LLM provider. || `API_BASE` | Base URL for the OpenAI-compatible chat-completions endpoint. || `MODEL_NAME` | Main model used by ResearchHarness. || `SERPER_KEY_ID` | Serper key for `WebSearch` and `ScholarSearch`: https://serper.dev/ || `JINA_API_KEYS` | Jina key for `WebFetch`: https://jina.ai/ || `MINERU_TOKEN` | MinerU token for `ReadPDF`: https://mineru.net/ |Optional variables:31 unmodified lines323334353637383931 unmodified lines| `API_KEY` | API key for your OpenAI-compatible LLM provider. || `API_BASE` | Base URL for the OpenAI-compatible chat-completions endpoint. || `MODEL_NAME` | Main model used by ResearchHarness. || `SERPER_KEY` | Serper key for `WebSearch` and `ScholarSearch`: https://serper.dev/ || `JINA_KEY` | Jina key for `WebFetch`: https://jina.ai/ || `MINERU_TOKEN` | MinerU token for `ReadPDF`: https://mineru.net/ |Optional variables:
29 unmodified lines303132333435363729 unmodified lines| `API_KEY` | OpenAI-compatible LLM 服务的 API key。 || `API_BASE` | OpenAI-compatible chat-completions endpoint 的 base URL。 || `MODEL_NAME` | ResearchHarness 使用的主模型。 || `SERPER_KEY_ID` | `WebSearch` 和 `ScholarSearch` 使用的 Serper key:https://serper.dev/ || `JINA_API_KEYS` | `WebFetch` 使用的 Jina key:https://jina.ai/ || `MINERU_TOKEN` | `ReadPDF` 使用的 MinerU token:https://mineru.net/ |可选变量:29 unmodified lines303132333435363729 unmodified lines| `API_KEY` | OpenAI-compatible LLM 服务的 API key。 || `API_BASE` | OpenAI-compatible chat-completions endpoint 的 base URL。 || `MODEL_NAME` | ResearchHarness 使用的主模型。 || `SERPER_KEY` | `WebSearch` 和 `ScholarSearch` 使用的 Serper key:https://serper.dev/ || `JINA_KEY` | `WebFetch` 使用的 Jina key:https://jina.ai/ || `MINERU_TOKEN` | `ReadPDF` 使用的 MinerU token:https://mineru.net/ |可选变量:
.env.example+2-2
README.md+2-2
agent_base/provider_compat.py+9-1
agent_base/tools/README.md+3-3
agent_base/tools/tool_web.py+6-6
agent_base/tools/tooling.py+2-2
agent_base/utils.py+2-2
docs/tutorial_en.md+2-2
docs/tutorial_zh.md+2-2