// npm 패키지
opencode-provider-litellm
OpenCode plugin for any LiteLLM proxy — auto-discovers models, auth, and capabilities
버전
3
메인테이너
1
라이선스
MIT
최초 publish
2026-05-21
publisher
danmademe
tarball
81,837 B
AUTO-PUBLISHED·2개 버전 인덱싱됨·최근 publish: 2026-05-22
// publisher 캠페인by danmademe
이 계정에서 catch된 패키지 2건고립된 catch가 아닙니다. 동일 publisher가 1개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.2.0· 2 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @0.2.0··AUTO-PUBLISHED·publisher: danmademeheuristic 55/100static flags 2llm benign (0.85) via ollamanew-publisher:1dknown-actor-target:teampcp:litellmpublic-github-pushreads-env-vars
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 2 files flaggedpatterns: 2
--- package/package.json (excerpt) --- { "name": "opencode-provider-litellm", "version": "0.2.0", "description": "OpenCode plugin for any LiteLLM proxy — auto-discovers models, auth, and capabilities", "type": "module", "exports": { ".": "./src/index.ts", "./server": "./src/index.ts" }, "files": [ "src" ], "scripts": { "typecheck": "tsc --noEmit", "test": "vitest", "test:run": "vitest run", "build": "tsc --noEmit && esbuild src/index.ts --bundle --outfile=dist/litellm.js --platform=node --target=node20 --format=esm --external:node:* --packages=external" }, "keywords": [ "opencode", "llm", "plugin", "litellm" ], "license": "MIT", "author": "Daniel Cherubini", "repository": { "type": "git", "url": "git+https://github.com/danielcherubini/opencode-provider-litellm.git" }, "engines": { "opencode": ">=1.14.0" }, "dependencies": { "@opencode-ai/plugin": "latest" }, "devDependencies": { "typescript": "^5.7.0", "@types/node": "^22.0.0", "vitest": "^3.0.0", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.27.0" } } --- package/src/utils.ts (excerpt) --- import type { LiteLLMModel, OpencodeModelConfig, PluginConfig } from './types.js' /** * Maps a LiteLLM model to OpenCode model config format. */ export function mapLiteLLMModel(model: LiteLLMModel): OpencodeModelConfig { const maxLen = model.max_model_len ?? 32768 const reasoning = /qwen3|deepseek-r1|o[134]/i.test(model.id) return { name: model.id, tool_call: true, reasoning, limit: { context: maxLen, output: maxLen, }, modalities: { input: ['text'], output: ['text'], }, } } /** * Resolves plugin configuration from environment variables or config options. * * Priority: * 1. LITELLM_URL / LITELLM_KEY environment variables * 2. Values from opencode.json plugin options * * Returns null if no source provides both url and apiKey. */ export function resolvePluginConfig(rawConfig: unknown): PluginConfig | null { const envUrl = typeof process !== 'undefined' ? process.env.LITELLM_URL : undefined const envKey = typeof process !== 'undefined' ? process.env.LITELLM_KEY : undefined const hasEnvVars = envUrl !== undefined && envUrl.length > 0 && envKey !== undefined && envKey.length > 0 if (hasEnvVars) { return { url: envUrl, apiKey: envKey } } // Fall back to config options from opencode.json if (rawConfig && typeof rawConfig === 'object' && !Array.isArray(rawConfig)) { const obj = rawConfig as Record<string, unknown> const configUrl = typeof obj.url === 'string' ? o
