Skip to content

fix: expand OpenCode plugin GATEWAY_PROVIDERS to route all proxiable providers through gateway#365

Merged
BYK merged 4 commits into
mainfrom
fix-expand-opencode-gateway-providers
May 16, 2026
Merged

fix: expand OpenCode plugin GATEWAY_PROVIDERS to route all proxiable providers through gateway#365
BYK merged 4 commits into
mainfrom
fix-expand-opencode-gateway-providers

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 16, 2026

Summary

GitHub Copilot and several other providers were missing from the OpenCode plugin's GATEWAY_PROVIDERS allowlist, causing their LLM traffic to silently bypass the Lore gateway — resulting in no memory features and no compaction, with zero warning to the user.

Changes

  • Expanded GATEWAY_PROVIDERS in packages/opencode/src/index.ts from 6 to 14 providers, organized by wire protocol
  • Added: github-copilot, fireworks, deepseek, groq, cerebras, openrouter, huggingface, vercel-ai-gateway
  • Aligns the OpenCode plugin with the Pi plugin's already-proven provider list
  • The gateway already had full support for all these providers (including dedicated GitHub Copilot worker model handling)

Context

The plugin rewrites provider baseURL only for providers in the allowlist. Unlisted providers bypass the gateway entirely, which means:

  • No memory features (distillation, knowledge, recall)
  • No compaction (OpenCode's built-in compaction is disabled by the plugin regardless)
  • No warning emitted — completely silent failure

Excluded providers (same as Pi plugin): amazon-bedrock (AWS SDK), google-vertex-ai (Google SDK) — these use native SDKs that can't be HTTP-proxied.

BYK added 4 commits May 16, 2026 19:04
- Completes Phase 3 Code Review generating findings in quality/results
- Fixes CB-001: saveForceMinLayer now uses UPDATE instead of DELETE
- Fixes CB-006: OpenAI translator now correctly handles tool_result
- Generates TDD logs and test files for fixed bugs
…nd tests

- Fix INSERT OR REPLACE in saveForceMinLayer else branch (same class as CB-001)
  Now uses INSERT OR IGNORE + UPDATE to preserve sibling columns for all paths
- Update stale docstring that still referenced DELETE behavior
- Add regression test for saveForceMinLayer(sid, N>0) on existing rows with data
- Add edge case tests for tool_result: mixed text+tool_result, multiple results, empty content
- Remove tautological test_functional.ts (tested local variables, not project code)
- Remove noisy generated artifacts (exploration_role_map.json, run_state.jsonl)
…providers through gateway

GitHub Copilot and several other providers (deepseek, groq, cerebras,
openrouter, huggingface, fireworks, vercel-ai-gateway) were missing from
the OpenCode plugin allowlist, causing their traffic to silently bypass
the Lore gateway. This meant no memory features (distillation, knowledge,
recall) and no compaction — with zero warning to the user.

The Pi plugin already included these providers and the gateway already
had full support for them. This aligns the OpenCode plugin with the
same provider coverage.
@BYK BYK self-assigned this May 16, 2026
@BYK BYK enabled auto-merge (squash) May 16, 2026 19:47
@BYK BYK merged commit cfe4ac2 into main May 16, 2026
7 checks passed
@BYK BYK deleted the fix-expand-opencode-gateway-providers branch May 16, 2026 19:48
@craft-deployer craft-deployer Bot mentioned this pull request May 16, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant