Commit Graph

178 Commits

Author SHA1 Message Date
Kevin Codex
b8ea6f8a6e Merge pull request #56 from gnanam1990/fix/gemini-auth-login-screen
fix: add CLAUDE_CODE_USE_GEMINI to is3P check to prevent login screen
2026-04-02 00:11:07 +08:00
gnanam1990
c3db3d882d fix: add CLAUDE_CODE_USE_GEMINI to is3P check in isAnthropicAuthEnabled
CLAUDE_CODE_USE_GEMINI was missing from the is3P check in
isAnthropicAuthEnabled(), causing Gemini users to see the
Anthropic login screen at startup even with GEMINI_API_KEY set.

isAnthropicAuthEnabled() returns true when is3P is false, which
triggers the OAuth/login flow. Since CLAUDE_CODE_USE_GEMINI was
not included, Gemini was not treated as a 3P provider here,
showing the gcloud/Anthropic login prompt unexpectedly.

Fix: add CLAUDE_CODE_USE_GEMINI to the is3P check, consistent
with how CLAUDE_CODE_USE_OPENAI is handled in the same block.

Fixes #43.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 21:29:34 +05:30
Kevin Codex
65af73910c improved startup screen 2026-04-01 23:32:38 +08:00
Juan Camilo
409e90c510 fix: use correct default port for wss:// in NO_PROXY matching
The proxy bypass logic assigned port 80 to any non-https protocol,
including wss:// whose default port is 443. A NO_PROXY entry like
example.com:443 would not match wss://example.com because the port
was incorrectly resolved to 80.

Relates to #40

Co-Authored-By: Juan Camilo <juancamilo.auriti@gmail.com>
2026-04-01 17:05:45 +02:00
Juan Camilo
481e608903 fix: show OpenAI/Gemini provider info in /status panel
The /status panel showed 'undefined' for the API provider label when
using OpenAI or Gemini providers, and did not display the base URL or
model name. Added provider labels and property sections for both.

Relates to #39

Co-Authored-By: Juan Camilo <juancamilo.auriti@gmail.com>
2026-04-01 17:04:42 +02:00
Juan Camilo
39d9616ed7 fix: update DeepSeek context window from 64k to 128k
DeepSeek V3 documentation specifies 128k context window for both
deepseek-chat and deepseek-reasoner. The previous 64k value caused
premature compaction and underutilization of available context.

Relates to #39

Co-Authored-By: Juan Camilo <juancamilo.auriti@gmail.com>
2026-04-01 17:03:57 +02:00
Kevin Codex
8750f84464 Merge pull request #44 from gnanam1990/fix/auth-ci-crash
fix: skip Anthropic credential check in CI for 3P providers
2026-04-01 22:35:16 +08:00
gnanam1990
1278967223 fix: skip Anthropic credential check in CI for 3P providers
In CI mode, auth.ts throws if ANTHROPIC_API_KEY or
CLAUDE_CODE_OAUTH_TOKEN are missing — even when using
CLAUDE_CODE_USE_OPENAI=1 or CLAUDE_CODE_USE_GEMINI=1.
This crashes any OpenAI/Gemini/Ollama CI pipeline immediately.

Fix: guard the throw with !isUsing3PServices() so non-Anthropic
providers skip the check entirely.

Also added CLAUDE_CODE_USE_GEMINI to isUsing3PServices() which
was missing — Gemini users were excluded from the 3P detection
used elsewhere in the same function.

Fixes #40.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:00:42 +05:30
Vasanthdev2004
7ef085c605 test: cover deepseek max token limits 2026-04-01 19:17:58 +05:30
Vasanthdev2004
ce45bd080e Merge origin/main into provider-profile-recommendations 2026-04-01 18:38:59 +05:30
gnanam1990
4ca94b2454 feat: add context window guard for OpenAI-compatible models
Without this fix, getContextWindowForModel() returns 200k for all OpenAI
models (the Claude default), causing two problems:
  1. Auto-compact/warnings trigger at wrong thresholds (200k instead of 128k)
  2. getModelMaxOutputTokens() returns 32k causing 400 errors from APIs that
     cap output tokens lower (gpt-4o supports max 16384)

Fix:
- Add openaiContextWindows.ts with known context window sizes and max output
  token limits for 30+ OpenAI-compatible models (OpenAI, DeepSeek, Groq,
  Mistral, Ollama, LM Studio)
- Hook into getContextWindowForModel() so correct input limits are used
- Hook into getModelMaxOutputTokens() so correct output limits are sent,
  preventing 400 "max_tokens is too large" errors

All existing warning, blocking, and auto-compact infrastructure works
automatically once the correct limits are returned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 17:42:04 +05:30
gnanam1990
a3d8ab0fec feat: add native Gemini provider for Google AI models
Adds Google Gemini as a first-class provider using Gemini's OpenAI-compatible
endpoint, supporting gemini-2.0-flash, gemini-2.5-pro, and gemini-2.0-flash-lite
across all three model tiers (opus/sonnet/haiku).

- Add 'gemini' to APIProvider type with CLAUDE_CODE_USE_GEMINI env detection
- Map all 11 model configs to appropriate Gemini models per tier
- Route Gemini through existing OpenAI shim (generativelanguage.googleapis.com)
- Support GEMINI_API_KEY and GOOGLE_API_KEY for authentication
- Fix model display name to show actual Gemini model instead of Claude fallback
- Add Gemini support to provider-launch, provider-bootstrap, system-check scripts
- Add dev:gemini npm script for local development

Bootstrap: bun run profile:init -- --provider gemini --api-key <key>
Launch: bun run dev:gemini

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 17:38:30 +05:30
Vasanthdev2004
f51cd3aa15 Merge origin/main into codex/provider-profile-recommendations
Preserve provider recommendation workflows while integrating Codex profile support, safer launch isolation, and updated docs/scripts from upstream main.
2026-04-01 17:33:07 +05:30
Kevin Codex
833c90fbc7 Merge pull request #12 from salmanrajz/fix/supply-chain-safety-and-build-docs
security: remove runtime require of unverified modifiers-napi package
2026-04-01 19:30:07 +08:00
Kevin Codex
2e70fa1bde Merge pull request #11 from strato-space/feat/codexplan-codexspark
Add Codex plan/spark provider support
2026-04-01 19:28:55 +08:00
Kevin Codex
b7bc3f361c Merge pull request #9 from gnanam1990/feat/ollama-provider
fix: resolve frozen terminal for OpenAI/3P provider users (#3)
2026-04-01 18:48:37 +08:00
salmanrajz
cb24750cb7 security: remove runtime require of unverified modifiers-napi package
Fixes #7. The modifiers-napi package is an Anthropic-internal native
addon, but a package with the same name exists on npm and could be a
supply chain attack vector. The build script already stubs it, but
the source code had live require() calls that would execute when
running without the bundler (e.g. bun dev, ts-node).

Replaced both functions with safe no-ops since modifier key detection
is not needed in the open-source build. Build verified passing.
2026-04-01 12:10:31 +04:00
gnanam1990
6cf95f5b1d fix: show actual OpenAI model name in welcome screen UI
When using OpenAI provider, getPublicModelDisplayName() was incorrectly
returning "Opus 4.6" because CLAUDE_OPUS_4_6_CONFIG.openai maps to 'gpt-4o',
causing a false match in the switch statement. Now returns null for OpenAI
provider so the raw model name (e.g. 'gpt-4o') is displayed directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 13:23:48 +05:30
vp
cbeed0f76f Add Codex plan/spark provider support 2026-04-01 10:44:35 +03:00
Vasanthdev2004
8fe03cba57 fix: harden provider recommendation safety 2026-04-01 11:55:24 +05:30
Vasanthdev2004
174eb8ad3b feat: add intelligent provider profile recommendation 2026-04-01 11:16:49 +05:30
Kevin Codex
2d7aa9c841 feat: rebrand as Open Claude and harden OpenAI REPL 2026-04-01 13:31:18 +08:00
Reservieren
009c29d318 refactor: update import paths for react/compiler-runtime to react-compiler-runtime
feat: add OpenClaude local agent playbook for setup and usage instructions

chore: implement provider bootstrap script for profile initialization

chore: create provider launch script to manage provider execution

chore: add system check script for runtime diagnostics and validation

feat: implement useEffectEventCompat hook for React 18 compatibility
2026-03-31 22:09:56 -03:00
Kevin
747be9c2f3 fix: restore interactive OpenAI REPL startup 2026-04-01 05:16:40 +08:00
Kevin
651335f682 fix: skip auth and onboarding for OpenAI provider in interactive mode
The interactive REPL was hanging because isAnthropicAuthEnabled() didn't
recognize CLAUDE_CODE_USE_OPENAI as a 3rd party provider, triggering
OAuth flows. Also skip setup screens (onboarding, trust dialog) when
using the OpenAI shim.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 03:34:17 +08:00
did:key:z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr
3e652cafdf feat: add build system, stubs, and npm packaging — openclaude is now runnable
- package.json with all 70+ dependencies
- Bun build script with feature flag shims, native module stubs, otel externals
- Stubs for ~15 missing source files (snapshot gaps)
- tsconfig.json for TypeScript
- bin/openclaude entry point
- Builds to single 19MB dist/cli.mjs
- Verified: --version and --help work

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 02:36:07 +08:00
did:key:z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr
619b5fb603 feat: add OpenAI-compatible provider shim — use any LLM with Claude Code
Adds a new 'openai' API provider that translates Anthropic SDK calls to
OpenAI chat completions format, enabling Claude Code's full tool system
(bash, file read/write/edit, grep, glob, agents) with any OpenAI-compatible
model: GPT-4o, DeepSeek, Gemini, Llama, Ollama, OpenRouter, and 200+ more.

Set CLAUDE_CODE_USE_OPENAI=1, OPENAI_API_KEY, and OPENAI_MODEL to use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 23:12:43 +08:00
did:key:z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr
d2542c9a62 asdf
Squash the current repository state back into one baseline commit while
preserving the README reframing and repository contents.

Constraint: User explicitly requested a single squashed commit with subject "asdf"
Confidence: high
Scope-risk: broad
Reversibility: clean
Directive: This commit intentionally rewrites published history; coordinate before future force-pushes
Tested: git status clean; local history rewritten to one commit; force-pushed main to origin and instructkr
Not-tested: Fresh clone verification after push
2026-03-31 03:34:03 -07:00