Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

opencode-fixes-huihui

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-fixes-huihui

Unified sticky-session plugin for opencode with session headers and prompt cache key.

latest
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

opencode-fixes-huihui

opencode 单插件版本:统一处理 sticky session headers 和 promptCacheKey,用于稳定会话路由与缓存命中。

安装

npm i opencode-fixes-huihui

使用

import StickySessionPlugin from "opencode-fixes-huihui";

export default {
  plugins: [StickySessionPlugin],
};

也可使用具名导出:

import { StickySessionPlugin } from "opencode-fixes-huihui";

行为

插件在 chat.params 中执行:

  • 仅对 @ai-sdk/openai provider 生效
  • 解析会话值优先级:
    • OPENCODE_PROMPT_CACHE_KEY
    • OPENCODE_STICKY_SESSION_ID
    • 现有 headers:x-session-id / conversation_id / session_id
    • input.sessionID
  • 将解析值同时写入:
    • input.model.headers.x-session-id
    • input.model.headers.conversation_id
    • input.model.headers.session_id
    • output.options.promptCacheKey

可选环境变量

  • OPENCODE_PROMPT_CACHE_KEY: 强制覆盖会话值(最高优先级)
  • OPENCODE_STICKY_SESSION_ID: 次优先级覆盖会话值

开发

npm run typecheck
npm run build

Keywords

opencode

FAQs

Package last updated on 18 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts