lukaszraczylo
|
6483eb8044
|
refactor: remove dead code, deduplicate defaultHome, simplify mcpEntry + kilo render
Dead code removed:
- BuildProviders, buildModels, ProviderEntry (no production callers)
- ZedLanguageModels (shadowed by adapter-local version, wrong schema)
- GatewayProviderID deprecated constant (zero references)
- Corresponding dead tests for BuildProviders
Deduplication:
- Extract common.DefaultHome() to internal/adapter/common/home.go
- All 7 adapters call common.DefaultHome() instead of local copies (-49 lines)
Simplification:
- mcp.go: merge MCPClaudeStyle/MCPCrushStyle branches (identical URL path,
one-line difference in stdio path) — clearer intent, fewer lines
- kilo.go: extract opencode.jsonc merge to mergeOpenCodeJSONC() helper,
Render() drops from 92 to ~55 lines
- goose.go: strings.IndexByte → strings.Cut in splitProviderModel
|
2026-05-23 21:22:49 +01:00 |
|
lukaszraczylo
|
fb02b165d7
|
feat: URL-derived provider keys (hs-<hostname>) + dedup providers sharing same gateway URL
- GatewayProviderKey() derives stable key from gateway URL hostname
e.g. https://llmgw.h.raczylo.com/v1 → hs-llmgw-h-raczylo-com
- AbsorbDuplicateProviders() merges providers sharing the same baseURL
into our canonical entry; user-crafted model metadata wins for overlaps
- kilo: renders to opencode.jsonc (primary config), deep-merges providers,
deletes enabled_providers filter that was hiding our gateway
- opencode: absorbs duplicate providers from existing config
- All adapters use GatewayProviderKey() instead of hardcoded string
- Fix goose URL doubling (was /v1/v1/chat/completions → /chat/completions)
- Fix token propagation: api_key written directly (not env var ref)
- Zed: adds prompt_cache_key capability, deletes context_servers key
to avoid ContextServerSettingsContent serde untagged-enum parse error
|
2026-05-23 21:13:16 +01:00 |
|