Skip to content

Add local Ollama/Qwen support through the OpenAI-compatible provider#122

Closed
punyaslokdutta wants to merge 4 commits into
willchen96:mainfrom
punyaslokdutta:codex/ollama-qwen-local-inference
Closed

Add local Ollama/Qwen support through the OpenAI-compatible provider#122
punyaslokdutta wants to merge 4 commits into
willchen96:mainfrom
punyaslokdutta:codex/ollama-qwen-local-inference

Conversation

@punyaslokdutta
Copy link
Copy Markdown

Summary

  • add OpenAI-compatible local runtime support for self-hosted endpoints like Ollama
  • add Qwen model options in Mike's model picker and document the Docker-plus-native-Ollama setup
  • make the OpenAI-compatible path stream local model output incrementally so Mike surfaces answers instead of appearing blank while Ollama is still generating

What changed

  • made the OpenAI adapter configurable via OPENAI_COMPAT_BASE_URL, OPENAI_COMPAT_MODEL, and OPENAI_COMPAT_ENDPOINT_MODE
  • added support for chat-completions style OpenAI-compatible backends used by Ollama and vLLM
  • treated env-configured OpenAI-compatible runtimes as available even without a hosted OpenAI API key
  • added Qwen 3 8B and 14B options to the model picker
  • documented the local Docker app stack plus native Ollama workflow for testing Mike locally

Validation

  • npm run build --prefix backend
  • local Docker stack rebuilt with the Ollama-compatible env path
  • verified local Supabase keys were wired into the Docker env files for the local dev stack

Notes

  • frontend lint still reports existing repo-wide issues unrelated to this branch
  • this branch is intentionally scoped to local inference enablement first; broader benchmark work can build on top

Screenshot

Mike with Qwen on Ollama

@BaileySimrell
Copy link
Copy Markdown

Personally I would love to see Vercel AI Gateway support. https://vercel.com/ai-gateway

punyaslokdutta and others added 4 commits May 16, 2026 21:32
- storage.ts: replaced @aws-sdk/client-s3 + R2 with Supabase Storage
  (upload, download, delete, signed URLs all via @supabase/supabase-js)
- .env.example: removed R2 vars, added STORAGE_BUCKET=mike
- frontend/package-lock.json: updated after npm install --legacy-peer-deps

Local setup recap:
- Backend :3001, frontend :3000
- Supabase project: gbdfkvaigunfvrgurkwk (ap-northeast-1 Tokyo)
- Storage bucket: mike (private, Supabase Storage)
- DB schema applied via 000_one_shot_schema.sql
- AI provider: Gemini
- Secrets in .env / .env.local — gitignored, not committed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded origin string with a callback that allows all localhost
ports in non-production environments while restricting to FRONTEND_URL in
production.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@punyaslokdutta punyaslokdutta force-pushed the codex/ollama-qwen-local-inference branch from 169b027 to 2ea5f8f Compare May 16, 2026 16:27
@willchen96
Copy link
Copy Markdown
Owner

Thank you for this Punyaslok. There are many great ideas here. But I have decided to keep the main repo as it is without large structural changes as proposed in this repo. I plan to instead have an official Mike-Local version that provides local LLM support. Mike-Local will possibly be a React native app which is more suitable for a local desktop version.

As for Vercel AI Gateway Support I will likely implement in a PR.

@willchen96 willchen96 closed this May 16, 2026
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.

3 participants