Commit Graph

441 Commits

Author SHA1 Message Date
Rithul Kamesh
25c5987276 feat: add support for GitHub Models provider
- Introduced environment variable CLAUDE_CODE_USE_GITHUB to enable GitHub Models.
- Added checks for GITHUB_TOKEN or GH_TOKEN for authentication.
- Updated base URL handling to include GitHub Models default.
- Enhanced provider detection and error handling for GitHub Models.
- Updated relevant functions and components to accommodate the new provider.
2026-04-02 11:25:28 +05:30
Kevin Codex
1059915c84 Merge pull request #105 from rajrasane/fix/third-party-provider-compatibility
fix: Improve session title handling and Docker compatibility
2026-04-02 13:50:18 +08:00
Kevin Codex
fcb1b82d9b Merge pull request #104 from slx618/fix/azure-max-completion-tokens
fix Azure OpenAI max token parameter
2026-04-02 13:40:23 +08:00
Kevin Codex
e54c39e3cb Merge pull request #100 from Vasanthdev2004/ripgrep-install-hint
fix: add clearer ripgrep install guidance
2026-04-02 13:39:52 +08:00
Kevin Codex
a6ba34a3de Merge pull request #99 from gigachad80/main
Update resume command in gracefulShutdown message
2026-04-02 13:36:45 +08:00
Kevin Codex
7128a938d9 Merge pull request #101 from BrainSlugs83/security/compile-time-telemetry-removal
security: kill GrowthBook phone-home and auto-updater at build time
2026-04-02 13:35:27 +08:00
Raj Rasane
f340b199c8 refactor: simplify session title fallback to static 'Open Claude' 2026-04-02 11:04:35 +05:30
Raj Rasane
63546dcd9c chore: rename default terminal title to Open Claude 2026-04-02 11:04:35 +05:30
Raj Rasane
302d9d4e44 fix: enable session title generation for non-firstParty providers 2026-04-02 11:04:35 +05:30
Raj Rasane
310f1d344a fix: provide local session title fallback for 3P providers
When using non-Anthropic providers (Ollama, Gemini, Codex), the
underlying call to queryHaiku for session title generation fails.
Previously, this caused the catch block to return null, leaving the
terminal tab permanently stuck on 'Claude Code'.

Now, when the API call fails, we gracefully derive a title locally from
the user's first message (first 7 words, sentence-cased), ensuring
users still see a meaningful session title in their terminal tab.
2026-04-02 11:04:35 +05:30
Raj Rasane
9590066b5b fix: gracefully handle Docker/remote Ollama in system-check
When Ollama runs inside Docker or a remote container, the native
'ollama ps' command is unavailable on the host. Instead of hard-failing
and blocking CLI startup, downgrade to a pass() with a warning when
the HTTP ping has already confirmed the server is reachable.
2026-04-02 11:04:35 +05:30
Kevin Codex
ad947e996a Merge pull request #102 from BrainSlugs83/security/pin-exact-dependency-versions
security: pin all dependencies to exact versions
2026-04-02 13:34:15 +08:00
Kevin Codex
b2ba2c0cc5 Merge pull request #98 from Vasanthdev2004/windows-csiu-input-fix
fix: support CSI-u printable input on Windows
2026-04-02 13:30:36 +08:00
Mikey
0746802b6a security: kill GrowthBook phone-home and auto-updater at build time
Adds a Bun build plugin that replaces analytics/telemetry modules with
no-op stubs at compile time.

Primary targets (NOT killed by PR #94 or the feature() shim):

  - GrowthBook: phones home to api.anthropic.com on every launch,
    sending account UUID, org UUID, email, device ID, subscription
    type. Refreshes every 6 hours. Now returns defaults without
    making any network call.

  - Auto-updater: contacts storage.googleapis.com and npm registry
    on launch to check for new versions. Now returns null/no-op.

Defense-in-depth (already gated by PR #94 or feature flags, but
now the code itself is replaced with empty functions):

  - Datadog, 1P event logging, BigQuery metrics, Perfetto tracing,
    session tracing, plugin fetch telemetry, transcript sharing.

Deliberately NOT stubbed:

  - Plugin marketplace (downloads.claude.ai) — needed for /plugin
  - User-configurable OTel (CLAUDE_CODE_ENABLE_TELEMETRY) — opt-in

Implementation: separate plugin file (scripts/no-telemetry-plugin.ts)
with a 2-line hook in build.ts. The plugin file does not exist
upstream so it cannot cause merge conflicts.
2026-04-01 21:57:15 -07:00
Vasanthdev2004
2bade922ef fix: add clearer ripgrep install guidance 2026-04-02 10:19:36 +05:30
Dark Yagami
4918caa22b Update resume command in gracefulShutdown message 2026-04-02 10:18:27 +05:30
Vasanthdev2004
ffbc1f8f6e fix: support CSI-u printable input on Windows 2026-04-02 10:05:16 +05:30
Mikey
5f75f67a27 security: pin all dependencies to exact versions
Removes caret (^) ranges from all 74 dependencies in package.json,
locking each to the exact version resolved in bun.lock.

Motivation: the axios supply chain attack of March 31 2026 demonstrated
that caret ranges are a live attack vector. axios@^1.14.0 would have
resolved to the trojanized 1.14.1 (bundled plain-crypto-js RAT, C2
sfrclak.com). Both 1.14.1 and 0.30.4 were unpublished within 24h.

Key pins:
  axios      ^1.14.0  → 1.14.0   (trojanized 1.14.1 blocked)
  undici     ^7.3.0   → 7.24.6   (7 CVEs between 7.3 and 7.24)
  yaml       ^2.7.0   → 2.8.3    (CVE-2026-33532 fix)
  ajv        ^8.17.0  → 8.18.0   (ReDoS fix)
  lodash-es  ^4.17.21 → 4.17.23  (prototype pollution fix)
  zod        ^3.24.0  → 3.25.76  (large range locked)

All 74 deps verified: integrity hashes match npm registry, no known
supply chain incidents, no postinstall scripts in lockfile.
2026-04-01 21:29:42 -07:00
Alex
f3ebd7d256 fix: convert max_tokens to max_completion_tokens for Azure OpenAI
Azure OpenAI API rejects the max_tokens parameter and requires
max_completion_tokens instead. This change ensures the conversion
is robust by validating that max_tokens is a positive number before
using it, preventing edge cases like null or "null" string values
from being incorrectly sent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 12:01:01 +08:00
Kevin Codex
1a60509fdc Merge pull request #96 from gnanam1990/fix/startup-screen-version-display
fix: show correct version in startup screen
2026-04-02 11:43:42 +08:00
gnanam1990
47b19c9a00 fix: style version number in startup screen accent orange
Apply the existing ACCENT colour (rgb 240 148 100) to the version
string so it stands out against the dim label, matching the warm
orange used throughout the startup screen for stars and status text.

Requested in #95.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 09:11:12 +05:30
gnanam1990
8c6a10517f fix: show correct version in startup screen
StartupScreen.ts was reading the version via globalThis['MACRO_DISPLAY_VERSION']
which is never populated — the Bun bundler inlines it as MACRO.DISPLAY_VERSION
(dot notation), not as a globalThis key.

Result: startup screen always showed the hardcoded fallback 'v0.1.4' regardless
of the installed version.

Fix: use MACRO.DISPLAY_VERSION ?? MACRO.VERSION directly, consistent with
cli.tsx, main.tsx, and logoV2Utils.ts.

Fixes #95

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 09:05:00 +05:30
Kevin Codex
cb8973e99b chore: release 0.1.6 v0.1.6 2026-04-02 11:18:21 +08:00
Kevin Codex
085ba9206e Merge pull request #80 from gnanam1990/fix/azure-cognitive-services-endpoint
fix: support Azure Cognitive Services and Azure OpenAI endpoints
2026-04-02 11:08:19 +08:00
Kevin Codex
0f34a8eadb Merge pull request #93 from gnanam1990/fix/gemini-schema-required-validation
fix: make schema normalization provider-aware for Gemini compatibility
2026-04-02 11:08:02 +08:00
Kevin Codex
10a5444241 Merge pull request #94 from kevincodex1/feature/removed-telemetry-noise
removed telemetry noise, unnecessary packets sent to anthropic
2026-04-02 11:04:29 +08:00
Kevin Codex
42e614dfb3 removed telemetry noise, unnecessary packets sent to anthropic 2026-04-02 11:01:14 +08:00
gnanam1990
ab911d1ed1 fix: make schema normalization provider-aware for Gemini compatibility
Two bugs in convertTools() caused Gemini's OpenAI-compatible endpoint
to reject tool schemas with 400 "schema requires unspecified property":

1. The Agent tool patch unconditionally pushed 'message' into required[]
   even though 'message' is not a property of the Agent schema. Gemini
   strictly validates that every key in required[] exists in properties.

2. normalizeSchemaForOpenAI() added all property keys to required[] for
   OpenAI strict mode, but this conflicts with Gemini's stricter schema
   validation which rejects required keys absent from properties.

Fix:
- Agent tool patch now only adds a key to required[] if it exists in
  schema.properties (fixes the 'message' 400 error on Gemini)
- normalizeSchemaForOpenAI() accepts a strict flag: true for OpenAI
  (promotes all property keys into required[]), false for Gemini
  (filters required[] to only keys present in properties)
- convertTools() detects CLAUDE_CODE_USE_GEMINI and passes strict=false

Fixes #82

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 08:28:07 +05:30
Kevin Codex
e524be7e22 Merge pull request #50 from auriti/fix/status-panel-openai-provider
fix: show OpenAI/Gemini provider info in /status panel
2026-04-02 10:50:16 +08:00
gnanam1990
ac2ea6aeb2 test: align codexShim test with strict schema normalization
Update the stale test expectation to match current behavior where
normalizeSchemaForOpenAI() promotes all properties into required[]
and marks the schema as strict: true.

Same fix as PR #72 — included here so PR #80 passes CI independently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 08:16:51 +05:30
Kevin Codex
8645dc4cce bump version 2026-04-02 09:39:44 +08:00
Kevin Codex
69f1d0b896 Merge pull request #34 from auriti/fix/macro-package-url
fix: define MACRO.PACKAGE_URL in build script to fix auto-update
2026-04-02 09:09:43 +08:00
Kevin Codex
36654c1f48 Merge pull request #45 from Vasanthdev2004/bun-version-note
docs: note minimum Bun version for Windows builds
2026-04-02 08:52:39 +08:00
Kevin Codex
546aee66d2 Merge pull request #85 from nusquama/fix/azure-openai-max-completion-tokens
fix: use max_completion_tokens instead of max_tokens for OpenAI-compatible APIs
2026-04-02 08:49:23 +08:00
nusquama
537ac24a9c fix: use max_completion_tokens instead of max_tokens for OpenAI-compatible APIs
Azure OpenAI and newer OpenAI models (o1, o3, o4...) reject `max_tokens`
with a 400 error and require `max_completion_tokens` instead.

Maps `params.max_tokens` → `max_completion_tokens` in the request body,
which is the current standard across OpenAI-compatible providers.
2026-04-02 08:36:01 +08:00
Kevin Codex
5fae22a8f2 Merge pull request #33 from auriti/fix/profile-file-permissions
fix: restrict .openclaude-profile.json to owner-only permissions (0600)
2026-04-02 08:30:01 +08:00
Kevin Codex
01246f98bd Merge pull request #51 from auriti/fix/proxy-wss-default-port
fix: use correct default port for wss:// in NO_PROXY matching
2026-04-02 08:29:39 +08:00
Kevin Codex
1ce19b9a39 Merge pull request #59 from Vasanthdev2004/gpt4o-max-tokens-test
test: cover OpenAI max token caps for gpt-4o and GPT-5.4
2026-04-02 08:24:25 +08:00
Kevin Codex
7ce7dc1c6e Merge pull request #72 from Vasanthdev2004/fix-pr-checks
test: align Codex strict schema expectation
2026-04-02 08:21:50 +08:00
Kevin Codex
2a8f6fc242 Merge pull request #75 from tunnckoCore/feat/disable-coauthor-and-openclaude-pr-branding
feat: support disabling commit co-author attribution
2026-04-02 07:51:02 +08:00
Kevin Codex
aa4a356f3b Merge pull request #81 from Vasanthdev2004/third-party-setup-fix
fix: skip Anthropic setup flow for third-party providers
2026-04-02 07:37:35 +08:00
Vasanthdev2004
fd6f4e6632 test: align Codex strict schema expectation 2026-04-02 01:37:30 +05:30
Vasanthdev2004
c22045e3e4 fix: skip Anthropic setup flow for third-party providers 2026-04-02 01:32:38 +05:30
gnanam1990
4c9b9f0d5d fix: support Azure Cognitive Services and Azure OpenAI endpoints
Azure endpoints require two changes vs standard OpenAI:
1. Auth header: `api-key: {key}` instead of `Authorization: Bearer {key}`
2. URL path: `/openai/deployments/{model}/chat/completions?api-version={version}`
   instead of `/chat/completions`

Detection is automatic when OPENAI_BASE_URL contains
`cognitiveservices.azure.com` or `openai.azure.com`.

The api-version defaults to `2024-12-01-preview` and can be overridden
via the AZURE_OPENAI_API_VERSION env var.

Handles all common Azure base URL formats:
- https://{resource}.cognitiveservices.azure.com/
- https://{resource}.cognitiveservices.azure.com/openai/v1
- https://{resource}.openai.azure.com/openai/v1
- https://{resource}.cognitiveservices.azure.com/openai/deployments/{model}/v1

Fixes #79

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 01:32:30 +05:30
tunnckoCore
8466fc138e test: align Codex strict schema expectation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 22:32:32 +03:00
tunnckoCore
6c0d2622c9 docs: document co-author attribution env var
Document OPENCLAUDE_DISABLE_CO_AUTHORED_BY in the README and clarify that it only affects commit trailers.
2026-04-01 21:46:52 +03:00
tunnckoCore
217a864ba0 feat: support disabling commit co-author attribution
Add an env var to suppress the default Co-Authored-By trailer and rebrand PR attribution text to OpenClaude.
2026-04-01 21:43:29 +03:00
Vasanthdev2004
936107f569 test: align Codex strict schema expectation 2026-04-02 00:11:42 +05:30
Kevin Codex
b204ae722f Merge pull request #71 from Vasanthdev2004/pr-checks
ci: add automated PR smoke and provider checks
2026-04-02 02:33:25 +08:00
Kevin Codex
80df0c57bd Merge pull request #48 from auriti/fix/empty-string-content-delta
fix: handle empty string delta.content in OpenAI streaming
2026-04-02 02:31:11 +08:00