npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

magpie-omni2api

v0.1.1

Published

Magpie provider plugins for the Lingma and Yunban chat services

Readme

magpie-omni2api

Magpie 插件,一个插件提供「灵码」和「云伴」两个 provider:在 Magpie 里直接登录、选模型、对话,不需要另外运行服务。已在 Magpie 0.1.4762 上验证。

本项目是独立实现,与灵码、云伴的运营方无关。使用前请确认你所在组织对相应服务的使用条款。

安装

在 Magpie 的插件页里添加:

| 来源 | 填什么 | |---|---| | npm | magpie-omni2api | | GitHub | github:XSIJIE975/magpie-omni2api | | 本机目录 | 插件所在目录的路径 |

添加后,在插件列表里点它的「选项」填写服务地址(见下)。

配置

插件不内置服务地址。在 Magpie 的插件列表里点本插件的「选项」,把两个地址改成你的:

| 选项 | 环境变量 | 必填 | 默认 | 说明 | |---|---|---|---|---| | lingmaBase | LINGMA_BASE | 是 | — | 灵码服务地址,如 https://lingma.example.com | | yunbanBase | YUNBAN_BASE | 是 | — | 云伴服务地址,如 https://yunban.example.com | | idleMs | — | 否 | 180000 | 流式响应允许的最大空闲时间(毫秒);模型思考久、常报「无数据」时调大 | | firstByteMs | — | 否 | 灵码 30000 / 云伴 60000 | 连接上游的超时(毫秒) | | modelsTtlMs | — | 否 | 300000 | 灵码模型列表的缓存时间(毫秒) |

基址也可以用环境变量传,选项里填了的优先。只配一个也可以:另一个 provider 会提示「未配置」,互不影响。

登录

登录会在本机浏览器打开一个 127.0.0.1 页面,Magpie 要运行在你自己的电脑上;远程或 Docker 部署无法登录。

灵码:选「灵码账号(浏览器登录)」,在浏览器里完成 SSO。账号属于多个组织时,在页面上选一个。

云伴:选「云伴账号(账密 + 验证码)」,选账号密码或企业 SSO,填账号密码,然后在浏览器页面里输入图形验证码;企业 SSO 还可能要短信验证码。

  • 图形验证码要手动输入,不做自动识别
  • 密码只在这次登录里用,不保存;会话失效后重新登录
  • 一个 provider 可以登录多个账号

常见问题

| 现象 | 处理 | |---|---| | 「无法连接 …」 | 检查网络 / VPN,以及 lingmaBase、yunbanBase 填得对不对 | | 「未配置 lingmaBase」/「未配置 yunbanBase」 | 在 options 里补上地址 | | 「上游流超过 …s 无数据」 | 上游太久没有输出,调大 idleMs | | 「上游 HTTP 401」或提示重新登录 | 登录已失效,重新登录 | | 「未知模型 …」 | 灵码的模型名要与上游完全一致,刷新模型列表后再选 |

许可证

MIT