Lazy-load koffi for bun runtime compatibility - #6
Draft
pranavpatilsce wants to merge 2549 commits into
Draft
Conversation
…te tests refs #1299
…and add EU profile - Remove :0 suffix from Opus 4.6 Bedrock model IDs (not valid for this model) - Fix us/eu Opus 4.6 cache pricing (0.5/6.25 instead of 1.5/18.75) - Add missing eu.anthropic.claude-opus-4-6-v1 inference profile - Fix coding-agent default Bedrock model ID to match catalog
…tings extensions paths collectAutoExtensionEntries now checks if the directory itself has a package.json with pi.extensions (or index.ts) before scanning children. This fixes duplicate extension loading when a manifest-aware directory is specified directly in settings.json extensions array. Fixes #1274
…path parsing fixes #1304
…ngelog fixes #1303 fixes #1304
…thinking Handle Bedrock Opus 4.6 adaptive thinking and interleaved beta
…ies (#1320) fixes #1309
The process.env access was outside the typeof process check, which would throw in browser environments. Moved inside the Node.js/Bun block for consistency with other env var access. Also added changelog entry for #1320 and improved docs clarity.
Covers OpenRouter and all OpenAI-compatible providers.
…pection CLI Bug fixes: - max_tokens: read per-model limits from ~/.agent/settings.toml [modelMaxTokens.anthropic] instead of hardcoded model.maxTokens/3 (~1.3K). Fallback: 128K for Opus 4.6, 64K for all others. max_tokens is a per-turn output cap, not context window. - budget_tokens: only set when explicitly configured via thinkingBudgetTokens. Was silently defaulting to 1024 (minimum), starving the model of thinking capacity. - Wire maxEmptyRetries/maxEmptyRetryTimeMs from AgentOptions through to AgentLoopConfig for empty response retry control. New features: - --dump-settings-template: print ~/.agent/settings_template.toml - --promote-settings: print effective merged settings as TOML candidate - SettingsManager.getResolvedSettings(): expose merged settings Files: agent.ts, anthropic.ts, args.ts, settings-manager.ts, main.ts
…each attempt, never persisted
…ng removed before reaching Anthropic
* uses pre-exchanged-api key * anthropic only atm
- basic text gen, tool calling, streaming (sonnet-4-6 + haiku-4-5) - thinking with budget tokens (sonnet-4-6) - model registry verification - all 9 tests passing against tokens.vers.sh
feat: integrate model router
When terminal is resized smaller than buildInfo width, the repeat() call would receive a negative argument causing RangeError. Now properly guards the condition and truncates when needed.
- Add alwaysHas1MContext() to detect opus-4-6, sonnet-4-6 - Update effectiveContextWindow() to return 1M unconditionally for 4.6 models - Fixes context pressure showing 60% when actual usage is 25% of 1M
koffi is only used for Windows VT input, but the top-level import causes module load failures on non-Node runtimes. Move to a dynamic require inside enableWindowsVTInput() which already guards on win32 and has a try/catch.
pranavpatilsce
marked this pull request as draft
March 26, 2026 17:33
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.
Summary
import koffifrom a top-level static import to a dynamicrequire("koffi")insideenableWindowsVTInput()inpackages/tui/src/terminal.tsProcessTerminal.start()call, and the existing try/catch handles unavailabilityTest plan
bun installsucceeds (koffi installs fine as a package)