Exploit database

GH-562a516151f045835c0ee477b90de486

barrersoftware/opencode-secure

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-22812

6 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files9

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

packages/opencode/src/provider/sdk/openai-compatible/src/responses/map-openai-responses-finish-reason.ts

TypeScript · 647 bytes
import type { LanguageModelV2FinishReason } from "@ai-sdk/provider"

export function mapOpenAIResponseFinishReason({
  finishReason,
  hasFunctionCall,
}: {
  finishReason: string | null | undefined
  // flag that checks if there have been client-side tool calls (not executed by openai)
  hasFunctionCall: boolean
}): LanguageModelV2FinishReason {
  switch (finishReason) {
    case undefined:
    case null:
      return hasFunctionCall ? "tool-calls" : "stop"
    case "max_output_tokens":
      return "length"
    case "content_filter":
      return "content-filter"
    default:
      return hasFunctionCall ? "tool-calls" : "unknown"
  }
}