Skip to content

OpenAI4S v1.0.1

Latest

Choose a tag to compare

@Nobody-Zhang Nobody-Zhang released this 17 Nov 07:31
· 150 commits to main since this release
d4ebcc8

OpenAI4S v1.0.1 brings the Volcengine Ark setup back in line with the current Agent Plan, fixes several ways an agent turn could stall with the plan's models (#264), reports failed sub-agents as failures (#263), and includes the changes merged since 1.0.0, among them the agentic RL runtime.

The database moves from schema 36 to 43. Read “Upgrading from 1.0.0” before starting this version on an existing data directory.

Fixed

  • Ark Agent Plan models. The Agent Plan gateway (the ark default) no longer serves doubao-seed-2.0-pro, doubao-seed-2.0-code, doubao-seed-2.0-lite, minimax-m3 or minimax-m2.7: a request names one of them and gets HTTP 404 UnsupportedModel. 1.0.0 shipped doubao-seed-2.0-pro as the default, so a fresh Ark setup failed on its first message. The default is now doubao-seed-2.1-pro, and the Ark presets follow the plan's published model table: Doubao Seed 2.1 Pro / Evolving / 2.1 Lite / 2.0 Mini, GLM 5.3 and 5.3 Flash, Kimi K3.1 Pro and K2.8 Preview, DeepSeek V4 Pro / V4 Flash / V4.1 Flash / V4.1 Flash Economy. A saved profile that names a retired model keeps failing with the provider's 404 until you edit its model.
  • First-run "Fetch models" on the Agent Plan. The plan gateway has no model-listing route, so the button always failed for the default protocol. With a key the gateway accepts, setup now offers the plan catalog (marked as the catalog, not as what the endpoint listed). Other endpoints are still asked for the ids they serve; an authentication failure is still reported as one.
  • Kimi K3.1 Pro. It accepts only its default sampling, and every request failed with HTTP 400 while OpenAI4S sent temperature. The OpenAI-compatible wire now omits it for this model.
  • Reasoning budget. The default completion budget (OPENAI4S_LLM_MAX_TOKENS) rises from 4096 to 16384: reasoning models spend it on thinking before they answer, and at 4096 GLM 5.3 ended every agent turn with nothing to act on. Two consecutive empty replies (no text, no tool call, no cell) now stop the turn as no_progress instead of looping to the turn limit at a full budget per call. An existing .env that sets OPENAI4S_LLM_MAX_TOKENS=4096 keeps that value.
  • Model connection test. The tool-call probe had a 32-token budget, so reasoning models (Doubao Seed 2.1 Pro, DeepSeek V4) were cut off mid-call and shown as "native tool call · unknown". It now has 256 tokens; earlier results are marked stale so you can test again.
  • Sign-in. The local os_token cookie lasted only for the browser session: every browser restart asked for a new openai4s url link, which the macOS app cannot even print without a terminal. It now lasts 30 days, stays HttpOnly and SameSite=Strict, and stops working as soon as the access token changes. A sign-in link opened while already signed in is now also scrubbed from the address bar and history.
  • OpenMHS lab native tools. A lab started or extended from the CLI (openai4s lab add …, openai4s lab up) while the daemon was running never registered the native mhs_* tools, so sessions could not reach the flow reactor or any device added --via mhs. New sessions now register them before their tools are built.
  • openai4s env apply. A failed build printed only "conda exited 1". It now prints the package manager's last lines, for example conda 25.5+'s CondaToSNonInteractiveError with the exact conda tos accept commands.
  • Background jobs. exec_background's description now says it is for jobs that take minutes and that ordinary code runs as a ```python cell; models were sending short analyses, even todo updates, through this approval-gated tool. When that submission is refused, the result now also says to reply with one fenced cell and no tool calls; Doubao Seed 2.1 Pro had answered a refusal with "a normal foreground cell" and called the tool again.
  • Repeated todo lists. Doubao Seed 2.1 Pro re-sent an identical write_todos list turn after turn while announcing the step it never took, until the turn stopped as no_progress. An unchanged list now answers that re-sending it is not progress and that the in-progress step should be done now.
  • Long web_fetch pages. A tool result holds at most 20,000 characters whatever max_chars asks, and a longer page was cut with a bare … [truncated]. Kimi K3.1 Pro then repeated the identical call until the turn stopped. The result now gives the response size and says to fetch the whole document with host.web_fetch(...) in a Python cell, which was never capped.
  • PDFs fetched as text. web_fetch decodes whatever it receives as text, so a PDF reached the model as the first 20 KB of its raw stream. A model tried to rebuild a 1.6 MB file from that fragment and went looking for the paper elsewhere. The result now says it is a PDF and how to read one (save it with web_download, then extract the text with pypdf in a cell), or to look for an HTML page of the same paper. A Python cell's host.web_fetch still receives the unmodified result.
  • Announced but absent cells. Doubao Seed 2.1 Pro wrote "Now I'll download the PDF in the kernel and extract its table" in 30 of 48 consecutive replies, and sent a web search or a fetch each time: native tools cannot run Python, and nothing in their results showed that no code had run. A native batch whose reply names a cell or the kernel but carries no cell now gets a note saying so, and how to send one.
  • Failed sub-agents. A delegated child that failed (task_status failed, or an error stop) reached its parent as a successful delegate_task call: neither the model nor the no-progress check saw a failure, and the audit log and the RL step record called it a success. It is now a failed tool call that still carries the child's structured result (status, stop reason, artifacts). A child that died on an LLM connection failure counts as a transient provider error, not as the parent making no progress (#263).
  • Model call deadline. The default total deadline of one model call (OPENAI4S_LLM_TOTAL_TIMEOUT, covering retries, streaming and usage draining) rises from 600 to 900 seconds. An existing .env that sets OPENAI4S_LLM_TOTAL_TIMEOUT=600, as a copy of 1.0.0's .env.example does, keeps that value (#263).
  • OPENAI4S_OPENMHS=off. It turned OpenMHS discovery off, but an OpenMHS adapter that was already importable still registered its native mhs_* tools. off now keeps them out as well (#263).
  • Scripts written with write_file. A .py or .R file written through the tool now says in its result that nothing has run it, and what to send. The model had written the same script five times, with a byte count as the only answer.

Added since 1.0.0

  • Agentic RL runtime and Science Trajectory contract v1 (#262). Its tables are why the database moves to schema 43.
  • Model discovery in First-run setup (#257).
  • Optional anonymous Parallel search (#254).
  • Current Ark CLI API-key listing (#259) and documentation refreshes (#260, #261).

Upgrading from 1.0.0

  1. Back up first. Stop the daemon (openai4s stop, then check openai4s status) and copy the whole data directory while nothing is running, including any openai4s.db-wal or openai4s.db-journal file, for example cp -a ~/.openai4s ~/.openai4s-before-1.0.1. The container image keeps its data in the /data volume.
  2. The first database-opening command migrates schema 36 → 43. Migrations 37 to 43 create the rl_* tables of the agentic RL runtime (trajectories, dataset snapshots, budget ledgers, resource admissions, phase bindings, and run and step receipts). They start empty, and no table, index or row that 1.0.0 stored is altered or removed. doctor and diagnostics inspect the schema without upgrading it.
  3. Downgrade is unsupported. 1.0.0 refuses the newer schema, and the copy you made is the way back.

The upgrade guide is docs/upgrading.md.

中文摘要

  • 数据库从 schema 36 升级到 43:只新增智能体强化学习运行时的 rl_* 表,不改动 1.0.0 的任何表和数据。首次打开数据库的命令会自动迁移;升级前请先停止 daemon 并复制整个数据目录。不支持降级(1.0.0 会拒绝更新的 schema),回退请恢复备份。
  • 新增 Agentic RL 运行时与 Science Trajectory v1 契约(#262)、首次运行的端点模型发现(#257)、可选的匿名 Parallel 搜索(#254)。
  • 方舟 Agent Plan 已下线 doubao-seed-2.0-pro/-code/-lite 与 minimax-*,1.0.0 的默认模型因此首条消息即报 404 UnsupportedModel。默认改为 doubao-seed-2.1-pro,预设与方舟官方套餐模型表一致。
  • 首次运行"从端点获取模型"在 Agent Plan 上可用(该网关没有模型列表接口,改为提供套餐模型目录)。
  • 修复 Kimi K3.1 Pro 因 temperature 参数被拒;默认输出预算 4096 → 16384,连续两次空回复即停止,避免推理模型(如 GLM 5.3)无限空转。
  • 连接测试的工具调用探测不再把推理模型误判为 unknown。
  • 本地登录 cookie 有效期 30 天,浏览器重启后无需重新登录;登录链接中的令牌总会从地址栏清除。
  • CLI 启动 OpenMHS 实验室后,正在运行的 daemon 的新会话也能使用原生 mhs_* 工具。
  • openai4s env apply 失败时显示 conda 的真实报错(如服务条款未接受)。
  • 模型原样重发待办清单(write_todos)时,工具结果会明确提示"清单未变,请直接执行当前步骤";web_fetch 超出 2 万字符被截断时,结果会说明响应大小并指引在 Python 单元中用 host.web_fetch 读取全文,避免模型反复重试同一调用;后台任务提交被拒绝时,结果会提示"普通代码请直接回复一个 ```python 单元",避免模型反复重提。
  • 子代理(delegate_task)失败时,现在作为失败的工具调用返回给模型和"无进展"检测,并保留子任务的结构化结果;审计记录和 RL 步骤记录也记为失败。子代理因 LLM 连接失败而终止时,按服务端的临时错误处理,不算父任务无进展(#263)。
  • 单次模型调用的默认总期限(OPENAI4S_LLM_TOTAL_TIMEOUT,含重试、流式读取和计费排空)从 600 秒提高到 900 秒;.env 中已显式设置的值(例如从 1.0.0 的 .env.example 复制来的 600)保持不变(#263)。
  • OPENAI4S_OPENMHS=off 现在也会阻止已可导入的 OpenMHS 适配器注册原生 mhs_* 工具(#263)。
  • 模型回复里说"在内核/代码单元中运行"却只发出原生工具调用时,结果里会提示"未运行任何代码,请单独发送一个 ```python 单元";用 write_file 写出 .py/.R 脚本后,结果也会说明"文件已写入,尚未运行";`web_fetch` 抓到 PDF 时会说明"这是 PDF,读不了文本,请用 `web_download` 保存后在单元里用 `pypdf` 提取",不再把原始字节流交给模型。