Dashboard › opencode › Distillation
fb680088-68e0-430e-9b90-2970a42831b4["lore_tm_v1_q4k_lgfc0KMTrkP3mbxmoFQRrlt4wNpk52ATN_xFY6g","lore_tm_v1_m_9w_A0VPAm_f4vK1A3EdMlSfiR9gHpdW6Ebr64ckko","lore_tm_v1_fhbdhTBn0FE4j7Mdg7bYWgfXbRoqWIpkIndJUQVmQzE","lore_tm_v1_rjUi-PYQIhwcgYJ-ikRs2UZZ1MjtUvlSVkrN68ZwL0w","lore_tm_v1_jPjvV-PzdWvMmXEuIN4o2xytQbA3Nlm41MDCySA61Ss","lore_tm_v1_jMorK46iI8ezinN2nij8CKLCRkHesvolacssmNZMs74","lore_tm_v1_AnbJeRbRsSaU_m4HGxqqYJ1oA3ks_h1brxjeuqu2uGc","lore_tm_v1_BvrZNWnV4OKeNOL1j4BIU1bSKn2toHmOy8ZAcGg2MDE","lore_tm_v1_HIrTEAIw2511wimjHz6n7f0EvtmfJHg0u-oXTgaMXVI","lore_tm_v1_sCnteJXqYXUDM0geyXiF3kh-yg6jklp59g0nLr43YAs","lore_tm_v1_8iSd56vAgtrW52bWH4M0CrDWhWZis6s5kXdfYusWK-s","lore_tm_v1_9GihnF59FGjA26sqUcakvDxQZ5hkPuIvR6OPNJ2PDWQ","lore_tm_v1_9JQJc2xxXamzYxkXyIRjf_O9IVF1Hto0mf74vj-WNf4","lore_tm_v1_kQGzqomYheHR1_4XDH9VpTfPQb7G7DwIHl9YoSZn_Yg","lore_tm_v1_HJqLUYUhADLJXgnfkuxQgeH8LZfF19DntY9ECC4_rjU","lore_tm_v1_CnByHpWC5yn6dVQnmac0M3e5bj4XnG4L_u2burvMiE4","lore_tm_v1_MIODIBoj0Uq-8FMFdAxJKI5jCoTKAqZJexj_FuSJXb8","lore_tm_v1_xNwVF3P78QBi5EzWghlsxsWkOfLhvquzvjWifp_m00I"]
AGENTS.md → 0db6083724c4f3cff6e0fa4723a0df424edf4951f685ec804822224c868c6160; .lore.md → 9e4f2da707df714528a2960788ad2cca489fd8ba5b8745e7551f912fc07ac58d; packages/core/src/fetch-interceptor.ts → 33dd563b5acf04a3403187b675c4245966053d835c073e5b1f6775eac982416a; packages/core/src/index.ts → 3733b1b2aeda2abd2a29f3faa2e3490b1882efaae819cc33922d98e0ff2b40e7; packages/core/test/fetch-interceptor-request.test.ts → 8e941b002a8f2c5de612e217c26b562547bd69cfce40f3283aebca985eab9618; packages/opencode/package.json → 37f411dc7f5f03cfbe01c06c12c15e6670064ef835129d43aa4dd91b2b2bed16; packages/opencode/script/build.ts → ffb408e62bd3278d386e5716c78296835b264660b7f93496d01007d180521fef; packages/opencode/src/index.ts → f7c5e6fd88f68281804dfbca12af2ec9e6617bcc14e054b1aa3332bc600bfd8c; packages/opencode/src/internal.ts → 4eaf5c314373f7c62c7b31310537bc0f0f7a1f09e28caa5d903258d98b740688; packages/opencode/src/server-runtime.ts → 657288e5191734cb56d76126b07e1a8ea6cb4587e298cbff2f6e0f9972c205ab; packages/opencode/src/server.ts → b9511c615dacef5d0927a219cbc6b59d3f980cdc253d5559c915ddfeee25feca; packages/opencode/test/internal.test.ts → 9cb2b8e66602dfa2c163b09f43196e2b6de436ecb45d6540c5f4662d249c417b; packages/opencode/test/package.test.ts → 32813c0e9ad52e40a1ba3252d011e5be43c4aaa826365e5bcff6b7c7ea49d06c; packages/opencode/test/server-runtime.test.ts → 2ffd6b720723bd20b7806f141b3cfaf7c28f87c3d92ac3bb1de491d9939e2ae4; packages/opencode/test/server.test.ts → c5412e4b441e32b5977e95ab696ad3813930328bef5e27c351fd83a8480cccc0; pnpm-lock.yaml → b781ac85941b8946178cba560f2429f13057a915790bddbf09812380661f1709./home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts found exactly 54 pathname-related matches.isManagementPath(pathname) in /home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts:203-209 recognizes /, /api, /api/*, /ui, and /ui/*.isDataPlanePath(pathname) in /home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts:213-224 recognizes /v1/messages, /v1/chat/completions, /chat/completions, /v1/responses, /v1/codex/responses, /v1/responses/compact, /v1/compact, /v1/models, paths matching GEMINI_PATH_RE, and paths matching BEDROCK_RUNTIME_PATH_RE./home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts rejects WebSocket upgrades with WebSocket transport is not supported for ${pathname}; use HTTP. and logs [lore] rejecting WebSocket upgrade for ${pathname} (HTTP-only gateway)./home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts dispatches POST routes for /v1/messages, /v1/chat/completions, /chat/completions, Gemini generateContent/streamGenerateContent, /v1/responses/compact, /v1/codex/responses, /v1/responses, /v1/compact, and Bedrock Runtime paths; it also dispatches GET /v1/models, GET /health, /_lore/control, /api/*, /ui//ui/*, and GET /./home/byk/Code/opencode-lore-v2/packages/gateway/src/server.ts:1163-1174 parses each request pathname against http://gateway.local; data-plane requests receive special handling when an Origin header exists and further data-plane handling regardless of that header.No files found; the supplied result did not identify the search pattern./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/index.ts has exactly 7 relevant exports: AmazonBedrock, AmazonBedrockMantle, Google, GoogleVertex, GoogleVertexChat, GoogleVertexMessages, and GoogleVertexResponses./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/google.ts defines provider ID ProviderID.make("google"), exports routes = [Gemini.route], and supports optional baseURL, providerOptions, API key/auth, headers, and HTTP options./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/google.ts:29-34 is explicit auth, then optional supplied apiKey, then GOOGLE_GENERATIVE_AI_API_KEY; the result is sent in the x-goog-api-key header.configuredRoute(input) in /home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/google.ts:36-39 removes apiKey, auth, and baseURL from the spread options, then configures Gemini.route with endpoint: { baseURL } and resolved auth.configure(input = {}) in /home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/google.ts:41-56 returns { id, model, image, configure }; model(...) binds Gemini.ProviderOptionsInput, while image(...) creates a GoogleImages.model with the model ID, resolved auth, baseURL, headers, and merged HttpOptions./home/byk/Code/opencode-v2-pilot/packages/ai/src/protocols/gemini.ts defines DEFAULT_BASE_URL = "https://generativelanguage.googleapis.com/v1beta"./home/byk/Code/opencode-v2-pilot/packages/ai/src/protocols/gemini.ts:835-846 uses provider "google", provider metadata key "google", Endpoint.path(({ request }) => \/models/${request.model.id}:streamGenerateContent?alt=sse`, { baseURL: DEFAULT_BASE_URL }), Auth.none, and Framing.sse`; the model ID is embedded in the path and SSE framing is pinned at URL level.BEDROCK_RUNTIME_PATH_RE in /home/byk/Code/opencode-lore-v2/packages/gateway/src/translate/bedrock-runtime.ts:105-106 is /^\/v1\/model\/([a-zA-Z0-9._:-]+)\/(converse|converse-stream|invoke|invoke-with-response-stream)$/.anthropic.claude-opus-4-6-v1, google.gemma-3-4b-it, us.anthropic.claude-haiku-4-5, and anthropic.claude-opus-4-5-20251101-v1:0; its singular /model/ path avoids collision with /v1/models and /v1/messages.bedrockRuntimeUrl(region) in /home/byk/Code/opencode-lore-v2/packages/gateway/src/translate/bedrock-runtime.ts:113-114 returns https://bedrock-runtime.${region}.amazonaws.com without a trailing slash, allowing direct concatenation of /model/<modelId>/<verb>./home/byk/Code/opencode-v2-pilot/packages/ai/src/protocols/bedrock-converse.ts:774-790 uses provider "bedrock", provider metadata key "bedrock", and Endpoint.path<BedrockConverseBody>(({ body }) => \/model/${encodeURIComponent(body.modelId)}/converse-stream`); it reads the validated body so the endpoint path matches the body being signed, uses BedrockAuth.auth, exports sigV4Auth = BedrockAuth.sigV4, and uses the protocol’s framing`./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/amazon-bedrock.ts supports optional baseURL; configured endpoint precedence is explicit baseURL followed by bedrockBaseURL(resolvedRegion).SessionRequestKind is identically defined in /home/byk/Code/opencode-v2-pilot/packages/plugin/src/effect/session.ts and /home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/session.ts as "primary" | "compaction" | "title" | "generate"; the search found exactly 8 matches across those two files.100 displayed matches with additional matches available; relevant files included side-channel.ts, translate/gemini.ts, translate/anthropic.ts, compaction.ts, server.ts, translate/types.ts, telemetry-privacy.ts, sync.ts, sentry.ts, quota.ts, and ui.ts./home/byk/Code/opencode-lore-v2/packages/gateway/src/translate/gemini.ts, a thought: true part is treated as the model’s private reasoning summary; the reasoning summary round-trips as reasoning and is “never merged into the” ordinary content path (the search result truncated the comment after this exact phrase)./home/byk/Code/opencode-lore-v2/packages/gateway/src/translate/anthropic.ts:270 states: “Meta request passthrough (title gen, summaries, etc.) should NEVER enable caching — their” (the search result truncated the remainder); the operative decision is that meta/title/summary passthrough requests never enable caching.x-lore-agent matching a known primary agent means the request is “always a normal turn.”x-lore-agent matching a known meta/housekeeping agent means the request is “always passthrough.”/home/byk/Code/opencode-lore-v2/packages/gateway/src/compaction.ts:361-366 defines extractPreviousSummary(req), which applies PREVIOUS_SUMMARY_RE to lastUserText(req) and returns capture group 1 or undefined./home/byk/Code/opencode-lore-v2/packages/gateway/src/compaction.ts defines LORE_AGENT_HEADER = "x-lore-agent"."coder" and "code"; a matching case-insensitive x-lore-agent value forces isMetaRequest(req) to return false, making the request always a normal turn."title", "summary", "summarize", "categorize", "label", and "classify"; a matching case-insensitive x-lore-agent value forces isMetaRequest(req) to return true, making the request always passthrough.x-lore-agent value falls through to heuristic scoring rather than deciding primary or meta classification.isMetaRequest(req) first excludes compaction requests by returning false when isCompactionRequest(req) is true.isMetaRequest(req) heuristic scoring constants are: SCORE_FEW_TOOLS = 3 for tools <= 2; SCORE_FEW_MESSAGES = 3 for messages <= 2; SCORE_SHORT_SYSTEM = 2 for system prompts shorter than 500 characters; SCORE_LOW_MAX_TOKENS = 3 for maxTokens > 0 && maxTokens <= 300; SCORE_META_KEYWORDS = 2; and META_SCORE_THRESHOLD = 8.8 preserves backward compatibility because the old three-check conjunction scored 3 + 3 + 2 = 8.META_KEYWORD_SYSTEM_LENGTH = 2000, reducing false positives from large prompts mentioning titles or summaries incidentally.META_KEYWORDS are exactly, in order: 1. "generate a title", 2. "generate a short title", 3. "title for the conversation", 4. "title for this conversation", 5. "summarize this conversation", 6. "summarize the conversation", 7. "conversation summary", 8. "categorize", 9. "classify this", 10. "label this".isMetaRequest(req) uses a two-layer design: 1. authoritative explicit x-lore-agent classification for OpenCode plugin requests; 2. structural, token-budget, and keyword heuristics for all clients.isMetaRequest(req) returns score >= META_SCORE_THRESHOLD and is intentionally biased toward false negatives—letting meta requests enter the full pipeline—rather than false positives that incorrectly skip a real conversation turn.