Implement TOML configuration, provider chaining, and Omni client integration#5
Open
Implement TOML configuration, provider chaining, and Omni client integration#5
Conversation
…d Omni MCP client integration
…stiller support for request pre-processing
… omni client functionality
…mat detection logic
…tation for local development
…, and increase context token limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Auto Describe
Summary
This PR overhauls the CI, configuration, and runtime layers: the GitHub Actions workflow now delegates all checks to a single
make citarget; a newDEVELOPMENT.mdguide replaces the old env‑based docs; configuration switches from env vars to a TOML file that supports multiple providers and Omni distillation; the server now uses aUniversalRouterHandlerthat builds a provider chain and optional Omni distiller; an OpenAI‑to‑Anthropic adapter is added; OAuth credential management is introduced; the Makefile, Docker‑Compose, and README are updated to reflect these changes.Key Changes
make citarget replaces vet/test/build steps.DEVELOPMENT.mdreplaces env‑based instructions.config.toml(with provider list, Omni, fallbacks); env files removed.UniversalRouterHandler,router.NewProviderChain, Omni support.FromOpenAIRequestfor OpenAI → Anthropic conversion.ci, updatedsetupto use Go binary.Detailed Breakdown
.github/workflows/ci.ymlRemoved vet, test, build steps; added
make cijob.DEVELOPMENT.md• Full local dev guide (prereqs, init, setup, run, test, ci, build).
• Highlights Go 1.25+, Make, Git, config.toml wizard.
MakefileAdded
ci: fmt lint test buildwith success message.Changed
setuptogo run $(MAIN_PKG) setup.Kept
fmt,lint(go vet).README.mdRewritten intro, added TOC, problem/solution sections, feature list, architecture diagram, quick‑start, config schema, supported providers table, container notes, API reference.
Removed env‑based config section.
cmd/server/main.goSwitched to
handler.NewUniversalRouterHandler.Instantiates provider chain (
router.NewProviderChain) if providers defined.Adds Omni distiller (
omni.NewClient,omni.NewDistiller).Registers
/v1/messagesand/v1/chat/completionsto same handler.internal/adapter/from_openai.goImplements conversion of
OpenAIRequesttoAnthropicRequest, including tools, messages, and content blocks.internal/auth/oauth.go+store.goNew OAuth provider interface, manager, and file‑based credential store with JSON persistence.
internal/config/config.goRemoved env parsing; now loads from TOML (
LoadTOML).Adds fields:
OmniEnabled,OmniMCPURL,OmniMinContentBytes,Providers []ProviderConfig.Returns error if TOML missing.
config.toml.exampleProvides template with server, omni, provider, and fallback sections.
docker-compose.yamlReplaces env file with volume mount of
~/.heimsense/config.toml.go.mod/go.sumAdded
github.com/BurntSushi/toml v1.6.0.scripts/setup-claude.shremoved (replaced by Go setup).Other changes – updated README badges, removed legacy env example.
Notes
~/.heimsense/.env; ensureconfig.tomlexists or runheimsense setupto generate it.setupcommand now runs the Go binary, not a shell script.make cinow encapsulates all checks; run this locally before PRs.Breaking Changes
HEIMSENSE_CONFIGand.envare obsolete; useconfig.toml./v1/chat/completions; older clients using only/v1/messagescontinue to work.Last updated: 2026-05-03 11:21:14