internal/

directory
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT

Directories

Path Synopsis
adapter
auth
Package auth ports dashboardSession.js concepts into pure Go adapters.
Package auth ports dashboardSession.js concepts into pure Go adapters.
capabilities
Package capabilities ports open-sse/providers/capabilities.js into Go: the model-capability fallback chain used to resolve vision/reasoning/search/ tools, thinking wire format, and context/output token limits per model.
Package capabilities ports open-sse/providers/capabilities.js into Go: the model-capability fallback chain used to resolve vision/reasoning/search/ tools, thinking wire format, and context/output token limits per model.
db
mitm
Package mitm implements the MITM TLS interception proxy for the Go rewrite.
Package mitm implements the MITM TLS interception proxy for the Go rewrite.
oauth
Package oauth ports the static OAuth provider configurations from open-sse/providers/registry/*.js (the `oauth:` blocks) and src/lib/oauth/constants/oauth.js.
Package oauth ports the static OAuth provider configurations from open-sse/providers/registry/*.js (the `oauth:` blocks) and src/lib/oauth/constants/oauth.js.
paramsupport
Package paramsupport ports open-sse/translator/concerns/paramSupport.js into Go: a config-driven table of per-provider/model request-param rules applied before dispatch so unsupported params do not reach the upstream and trigger HTTP 400.
Package paramsupport ports open-sse/translator/concerns/paramSupport.js into Go: a config-driven table of per-provider/model request-param rules applied before dispatch so unsupported params do not reach the upstream and trigger HTTP 400.
pricing
Package pricing ports the legacy JS pricing model (open-sse/providers/pricing.js) into Go: canonical per-model rates (MODEL_PRICING), provider-specific overrides (PROVIDER_PRICING), glob-pattern fallbacks (PATTERN_PRICING), and the calculateCostFromTokens formula.
Package pricing ports the legacy JS pricing model (open-sse/providers/pricing.js) into Go: canonical per-model rates (MODEL_PRICING), provider-specific overrides (PROVIDER_PRICING), glob-pattern fallbacks (PATTERN_PRICING), and the calculateCostFromTokens formula.
provider
Package provider is the provider adapter: registry, base executor wiring, and provider-specific config.
Package provider is the provider adapter: registry, base executor wiring, and provider-specific config.
provider/antigravity
Package antigravityexec ports the Antigravity executor.
Package antigravityexec ports the Antigravity executor.
provider/azure
Package azureexec ports the Azure executor.
Package azureexec ports the Azure executor.
provider/base
Package base ports the BaseExecutor from open-sse/executors/base.js.
Package base ports the BaseExecutor from open-sse/executors/base.js.
provider/codebuddy
Package codebuddyexec ports the CodeBuddy-CN executor.
Package codebuddyexec ports the CodeBuddy-CN executor.
provider/codex
Package codexec ports the OpenAI Codex executor.
Package codexec ports the OpenAI Codex executor.
provider/commandcode
Package commandcodeexec ports the CommandCode executor.
Package commandcodeexec ports the CommandCode executor.
provider/cursor
agent.go ports the AgentService protobuf codec from open-sse/executors/cursor.js (upstream v0.5.40, commit 6994cd1f "executeAgent" path).
agent.go ports the AgentService protobuf codec from open-sse/executors/cursor.js (upstream v0.5.40, commit 6994cd1f "executeAgent" path).
provider/default
Package defaultexec ports the DefaultExecutor from open-sse/executors/default.js.
Package defaultexec ports the DefaultExecutor from open-sse/executors/default.js.
provider/devincli
Package devincli implements the Devin CLI executor: routes completions through the official Devin CLI binary via the Agent Client Protocol (ACP) JSON-RPC 2.0 over stdio.
Package devincli implements the Devin CLI executor: routes completions through the official Devin CLI binary via the Agent Client Protocol (ACP) JSON-RPC 2.0 over stdio.
provider/embedding
Package embedding ports the per-provider embeddings adapters from open-sse/handlers/embeddingProviders/*.js.
Package embedding ports the per-provider embeddings adapters from open-sse/handlers/embeddingProviders/*.js.
provider/gemini-cli
Package geminicliexec ports the Gemini CLI executor.
Package geminicliexec ports the Gemini CLI executor.
provider/github
Package githubexec ports the GitHub Copilot executor.
Package githubexec ports the GitHub Copilot executor.
provider/grok-cli
Package grokcliexec ports the Grok CLI / Grok Build executor.
Package grokcliexec ports the Grok CLI / Grok Build executor.
provider/grok-web
Package grokwebexec ports the Grok Web executor.
Package grokwebexec ports the Grok Web executor.
provider/iflow
Package iflowexec ports the iFlow executor.
Package iflowexec ports the iFlow executor.
provider/image
Package image ports the static image-generation provider registry from open-sse/handlers/imageProviders/index.js + the per-provider adapters' static transport config (baseUrl, authType, authHeader, format, bodyFields whitelist).
Package image ports the static image-generation provider registry from open-sse/handlers/imageProviders/index.js + the per-provider adapters' static transport config (baseUrl, authType, authHeader, format, bodyFields whitelist).
provider/kimchi
Package kimchiexec ports the Kimchi executor.
Package kimchiexec ports the Kimchi executor.
provider/kiro
eventstream.go ports the binary AWS EventStream codec half of open-sse/executors/kiro.js (upstream v0.5.40, commit 7c7fae39).
eventstream.go ports the binary AWS EventStream codec half of open-sse/executors/kiro.js (upstream v0.5.40, commit 7c7fae39).
provider/mimo-free
Package mimofreeexec ports the MiMo Free executor.
Package mimofreeexec ports the MiMo Free executor.
provider/ollama-local
Package ollamalocalexec ports the Ollama Local executor.
Package ollamalocalexec ports the Ollama Local executor.
provider/opencode
Package opencodeexec ports the OpenCode executor.
Package opencodeexec ports the OpenCode executor.
provider/opencode-go
Package opencodegoexec ports the OpenCode Go executor.
Package opencodegoexec ports the OpenCode Go executor.
provider/perplexity-web
Package perplexitywebexec ports the Perplexity Web executor.
Package perplexitywebexec ports the Perplexity Web executor.
provider/projectid
Package projectid ports open-sse/services/projectId.js: it fetches and caches the real Google Cloud Code project ID bound to an authenticated Antigravity / Gemini CLI account, so requests to those providers carry the user's actual project rather than a random one (which Google's anti-abuse system flags).
Package projectid ports open-sse/services/projectId.js: it fetches and caches the real Google Cloud Code project ID bound to an authenticated Antigravity / Gemini CLI account, so requests to those providers carry the user's actual project rather than a random one (which Google's anti-abuse system flags).
provider/qoder
Package qoderexec ports the Qoder executor.
Package qoderexec ports the Qoder executor.
provider/qwen
Package qwenexec ports the Qwen Code executor.
Package qwenexec ports the Qwen Code executor.
provider/resolver
Package resolver ports the per-provider live-model resolvers from open-sse/services/*Models.js.
Package resolver ports the per-provider live-model resolvers from open-sse/services/*Models.js.
provider/resolver/tokenrefresh
Package tokenrefresh ports the per-provider OAuth/token-refresh functions from open-sse/services/tokenRefresh/providers.js.
Package tokenrefresh ports the per-provider OAuth/token-refresh functions from open-sse/services/tokenRefresh/providers.js.
provider/search
Package search ports the static web-search provider registry from the legacy JS build:
Package search ports the static web-search provider registry from the legacy JS build:
provider/stt
Package stt ports the static STT provider registry from open-sse/providers/registry/{openai,groq,deepgram,gemini,assemblyai}.js.
Package stt ports the static STT provider registry from open-sse/providers/registry/{openai,groq,deepgram,gemini,assemblyai}.js.
provider/tts
Package tts ports the static TTS provider registry from open-sse/providers/registry/*.js ttsConfig blocks.
Package tts ports the static TTS provider registry from open-sse/providers/registry/*.js ttsConfig blocks.
provider/vertex
Package vertexexec ports the Vertex executor.
Package vertexexec ports the Vertex executor.
provider/webfetch
Package webfetch ports the per-provider web-fetch adapters from open-sse/handlers/fetch/index.js (runFirecrawl/runJina/runTavily/runExa).
Package webfetch ports the per-provider web-fetch adapters from open-sse/handlers/fetch/index.js (runFirecrawl/runJina/runTavily/runExa).
provider/xiaomi-tokenplan
Package xiaomitokenplanexec ports the Xiaomi Tokenplan executor.
Package xiaomitokenplanexec ports the Xiaomi Tokenplan executor.
pxpipe
Package pxpipe implements a Node subprocess bridge for the pxpipe-proxy library.
Package pxpipe implements a Node subprocess bridge for the pxpipe-proxy library.
rtk
thinking
Package thinking ports open-sse/translator/concerns/thinking.js (maps) and the gemini-level branch of thinkingUnified.js's applyFormat (c4f80d30).
Package thinking ports open-sse/translator/concerns/thinking.js (maps) and the gemini-level branch of thinkingUnified.js's applyFormat (c4f80d30).
translator
Package jsontosse synthesizes an OpenAI chat.completion.chunk SSE stream from a single, complete OpenAI chat-completion JSON body.
Package jsontosse synthesizes an OpenAI chat.completion.chunk SSE stream from a single, complete OpenAI chat-completion JSON body.
translator/claude
Package claude implements the Claude-to-OpenAI response translator and the OpenAI-to-Claude response translator.
Package claude implements the Claude-to-OpenAI response translator and the OpenAI-to-Claude response translator.
translator/codex
Package codex implements the codex format translator.
Package codex implements the codex format translator.
translator/commandcode
Package commandcode implements the CommandCode-to-OpenAI response translator.
Package commandcode implements the CommandCode-to-OpenAI response translator.
translator/cursor
Package cursor implements the cursor format translator.
Package cursor implements the cursor format translator.
translator/gemini
Package gemini implements the Gemini-to-OpenAI response translator and the OpenAI-to-Gemini/Gemini-CLI request translators.
Package gemini implements the Gemini-to-OpenAI response translator and the OpenAI-to-Gemini/Gemini-CLI request translators.
translator/kiro
Package kiro — conversation.go ports open-sse/translator/concerns/ kiroConversation.js (upstream 16cb40fd).
Package kiro — conversation.go ports open-sse/translator/concerns/ kiroConversation.js (upstream 16cb40fd).
translator/ollama
Package ollama implements the Ollama-to-OpenAI response translator.
Package ollama implements the Ollama-to-OpenAI response translator.
translator/openai
Package openai implements the OpenAI base format helpers and the OpenAI→Claude request translator.
Package openai implements the OpenAI base format helpers and the OpenAI→Claude request translator.
translator/register
Package register side-effect imports every translator subpackage so their init() registrations (translator.RegisterRequest / RegisterResponse) run in the final binary.
Package register side-effect imports every translator subpackage so their init() registrations (translator.RegisterRequest / RegisterResponse) run in the final binary.
translator/shared
Package shared contains helpers used by multiple translator packages.
Package shared contains helpers used by multiple translator packages.
transport/http
Package http implements the SSE stream pipe used by the /v1 chat pipeline.
Package http implements the SSE stream pipe used by the /v1 chat pipeline.
transport/http/accountfallback
Package accountfallback ports the JS account-selection error classification and per-model lock logic from open-sse/config/errorConfig.js + open-sse/services/accountFallback.js + src/sse/services/auth.js (markAccountUnavailable / clearAccountError).
Package accountfallback ports the JS account-selection error classification and per-model lock logic from open-sse/config/errorConfig.js + open-sse/services/accountFallback.js + src/sse/services/auth.js (markAccountUnavailable / clearAccountError).
transport/http/api
Package api implements the dashboard /api routes for the Go rewrite.
Package api implements the dashboard /api routes for the Go rewrite.
tunnel
Package tunnel implements the Cloudflare quick-tunnel and Tailscale funnel orchestration for the Go rewrite.
Package tunnel implements the Cloudflare quick-tunnel and Tailscale funnel orchestration for the Go rewrite.
Package app is the composition root for the 9Gouter Go rewrite.
Package app is the composition root for the 9Gouter Go rewrite.
domain
auth
Package auth defines the session, principal, and OIDC ports used for dashboard authentication.
Package auth defines the session, principal, and OIDC ports used for dashboard authentication.
chat
Package chat defines core chat request/response entities and pass-through types used by the proxy use case.
Package chat defines core chat request/response entities and pass-through types used by the proxy use case.
format
Package format defines the LLM request/response format enum and endpoint-based format detection ported from open-sse/translator/formats.js.
Package format defines the LLM request/response format enum and endpoint-based format detection ported from open-sse/translator/formats.js.
provider
Package provider defines the Executor and Provider ports used to talk to upstream LLM services.
Package provider defines the Executor and Provider ports used to talk to upstream LLM services.
settings
Package settings defines the configuration entities stored in SQLite.
Package settings defines the configuration entities stored in SQLite.
usage
Package usage defines usage recording entities and the repository port.
Package usage defines usage recording entities and the repository port.
usecase
auth
Package auth provides the dashboard authentication usecase.
Package auth provides the dashboard authentication usecase.
imageproxy
Package imageproxy implements the /v1/images/generations pipeline for the Go rewrite.
Package imageproxy implements the /v1/images/generations pipeline for the Go rewrite.
managedashboard
Package managedashboard exposes usecase operations for the dashboard /api routes.
Package managedashboard exposes usecase operations for the dashboard /api routes.
proxychat
Package proxychat — observability gate backed by the settings repo.
Package proxychat — observability gate backed by the settings repo.
proxyembeddings
Package proxyembeddings implements the /v1/embeddings upstream pipeline for the Go rewrite.
Package proxyembeddings implements the /v1/embeddings upstream pipeline for the Go rewrite.
proxyfetch
Package proxyfetch implements the /v1/web/fetch upstream pipeline for the Go rewrite.
Package proxyfetch implements the /v1/web/fetch upstream pipeline for the Go rewrite.
quotafetch
Package quotafetch ports the legacy JS per-provider usage fetchers (open-sse/services/usage/*.js) into Go.
Package quotafetch ports the legacy JS per-provider usage fetchers (open-sse/services/usage/*.js) into Go.
searchproxy
Package searchproxy implements the /v1/search pipeline for the Go rewrite.
Package searchproxy implements the /v1/search pipeline for the Go rewrite.
sttproxy
Package sttproxy implements the /v1/audio/transcriptions pipeline for the Go rewrite.
Package sttproxy implements the /v1/audio/transcriptions pipeline for the Go rewrite.
ttsproxy
Package ttsproxy implements the /v1/audio/speech pipeline for the Go rewrite.
Package ttsproxy implements the /v1/audio/speech pipeline for the Go rewrite.
videoproxy
Package videoproxy implements the /v1/videos/* surface for the Go rewrite.
Package videoproxy implements the /v1/videos/* surface for the Go rewrite.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL