Skip to content

feat(ai): modernize providers and add LiteLLM/Ollama adapters#962

Merged
willgriffin merged 4 commits into
mainfrom
codex/litellm-modernization
Apr 21, 2026
Merged

feat(ai): modernize providers and add LiteLLM/Ollama adapters#962
willgriffin merged 4 commits into
mainfrom
codex/litellm-modernization

Conversation

@willgriffin
Copy link
Copy Markdown
Contributor

What changed

This PR modernizes @happyvertical/ai as a broader provider cleanup release rather than a single-provider patch.

It adds first-class litellm and ollama adapters, updates provider and auto-detection wiring, improves model discovery and capability reporting, and fills in several previously thin or misleading provider paths.

It also expands integration coverage so we can validate real gateways and local model hosts instead of relying only on mocked behavior.

Highlights

  • add a first-class LiteLLM provider with provider-specific attribution, model resolution, and live integration coverage against llm.happyvertical.com
  • add a first-class Ollama provider with native chat, streaming, embeddings, vision description, image embedding fallback, and OpenAI-compatible image generation bridging
  • modernize Gemini and Bedrock provider implementations and tighten provider capability reporting across the package
  • improve Node-side provider auto-detection for LiteLLM, Ollama, Anthropic, and Gemini environments
  • update package docs, metadata, package surface, and generated agent documentation to reflect the expanded provider set
  • add deeper provider and integration tests, including live Ollama validation against internal nodes

Why

We want to make heavy use of LiteLLM and local Ollama infrastructure, and the package had started to accumulate a mix of OpenAI-shaped assumptions, partial provider implementations, and uneven integration coverage.

This release closes those gaps so the package is a better fit for heterogeneous model routing, local model hosts, and current SDK behavior.

Impact

Consumers can now configure type: 'litellm' or type: 'ollama' directly instead of routing everything through the OpenAI adapter.

Provider selection, capability reporting, model discovery, and observability are more honest across the supported backends, and the package now has stronger live validation for the environments we actually run.

Validation

  • pnpm --filter @happyvertical/ai build
  • set -a && source .env.local && set +a && pnpm --filter @happyvertical/ai test
  • OLLAMA_HOST=snail-ollama:11434 OLLAMA_INTEGRATION=1 pnpm --filter @happyvertical/ai test -- src/ollama.integration.test.ts
  • OLLAMA_HOST=warthog-ollama:11434 OLLAMA_INTEGRATION=1 pnpm --filter @happyvertical/ai test -- src/ollama.integration.test.ts
  • pre-push hook: turbo run typecheck

@willgriffin willgriffin marked this pull request as ready for review April 13, 2026 00:07
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc19b6be2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ai/src/node/factory.ts Outdated
Comment thread packages/ai/src/shared/factory.ts Outdated
@willgriffin willgriffin changed the title [codex] Modernize AI providers and add LiteLLM/Ollama adapters feat(ai): modernize providers and add LiteLLM/Ollama adapters Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 Version Bump Preview

When this PR is merged, packages will receive a minor
version bump based on your conventional commits.

What happens on merge?

  1. Tests run on main branch
  2. Packages are built
  3. Versions are bumped automatically
  4. Packages are published to GitHub Packages
  5. Git tags are created

No manual intervention needed! 🎉

@willgriffin willgriffin merged commit 14fa468 into main Apr 21, 2026
12 of 13 checks passed
@willgriffin willgriffin deleted the codex/litellm-modernization branch April 21, 2026 14:29
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