跳到主内容
@wquguru
精选85pi coding agent(GitHub Releases)AI 编程与模型

pi v0.80.8:统一模型运行时,xAI 登录,破坏性 API 变更

v0.80.8

原文
发到 X
推荐理由

pi 用户注意:v0.80.8 重构了模型运行时与鉴权 API,SDK 的 authStorage 和 modelRegistry 选项已移除,扩展需适配异步 ModelRuntime。建议升级前阅读迁移指南,并测试现有扩展兼容性。

New Features

  • Unified model runtime and provider authentication — ModelRuntime centralizes model configuration, provider-owned /login, and dynamic provider catalogs. See Providers.
  • Live model catalog refresh — /model refreshes configured providers in the background, and pi update --models forces an immediate refresh. See Install and Manage.
  • xAI device-code OAuth and Grok 4.5 Responses support — Sign in to xAI with a device code and use Grok 4.5 with low, medium, or high thinking. See xAI.

Breaking Changes

  • Replaced the SDK's CreateAgentSessionOptions.authStorage and modelRegistry options with the async modelRuntime option. AuthStorage and its storage backends are no longer exported; use ModelRuntime (or a custom pi-ai CredentialStore), or readStoredCredential() for one-off reads of auth.json.
  • Removed redundant ModelRuntime.getAll(), find(), getSnapshot(), and getAuthOptions() projections. Use the pi-ai Models methods getModels(), getModel(), getProviders(), and checkAuth() directly.
  • Replaced SDK request-auth assembly through ModelRegistry.getApiKeyAndHeaders() with ModelRuntime.getAuth(). Passing a provider ID returns provider-scoped auth; passing a model also resolves built-in, models.json, and extension model headers.
  • Changed extension-facing ModelRegistry.refresh() from synchronous void to Promise<void> because models.json loading is asynchronous. Extensions must await it before making synchronous registry reads.
  • Moved canonical dynamic catalog refresh to async ModelRuntime.refresh()/pi-ai Models.refresh(). Legacy extension OAuth modifyModels remains supported as a synchronous compatibility projection after credential initialization.

Added

  • Added ModelRuntime as the canonical async SDK and internal model/auth facade while preserving the synchronous extension-facing ModelRegistry API. ModelRuntime.create() accepts any pi-ai CredentialStore through its credentials option.
  • Added provider-owned /login discovery directly from registered pi-ai providers, including ambient auth status and informational links.
  • Added file-backed dynamic catalogs in models-store.json, per-provider pi.dev catalog overlays, and Radius gateway support including offline migration from legacy credential-cached catalogs.
  • Added extension provider refreshModels(context) support for dynamic model discovery with optional provider-controlled persistence.
  • Added pi update --models to force an immediate model catalog refresh without updating pi or extensions.
  • Added inherited xAI device-code OAuth login and Grok 4.5 OpenAI Responses support, with low, medium, and high thinking levels (#6651 by @Jaaneek).

Changed

  • Changed ModelRuntime to compose built-in providers, immutable models.json configuration, and extension overlays through ad-hoc pi-ai provider methods.
  • Changed ModelRuntime to own final request assembly: getAuth(model) includes configured model headers, stream methods resolve auth once, and before_provider_headers runs as the Models-only header transform before provider dispatch.
  • Changed /model to render the current model snapshot immediately, refresh configured providers in the background, and update the open selector with partial results or timeout errors.

Fixed

  • Fixed configured-provider catalog refresh to parse pi.dev's model-ID keyed responses, throttle checks to once per four hours, send the versioned pi user agent, treat unimplemented routes as unavailable overlays, and show concise refresh status in /model.
  • Fixed adjacent assistant thinking blocks to render as one thinking section.
  • Fixed inherited OpenAI Codex session IDs longer than 64 characters to meet the API limit (#6630).
  • Fixed inherited terminal output to normalize tab characters consistently (#6697 by @xz-dev).
  • Fixed the Windows terminal title after checking npm packages (#6629).
  • Fixed Bun standalone binaries to bundle OAuth adapters for interactive logins.

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近