Commit Graph

12 Commits

Author SHA1 Message Date
oldschoola a2854ba768 fix: migrate coding-agent tests from fs.rm to removeWithRetries
Migrate 203 test files (356 call sites) from fs.rm/fs.rmSync to
removeWithRetries/removeSyncWithRetries to reduce EBUSY test failures
on Windows. removeWithRetries is now exported from @oh-my-pi/pi-utils.

The migration uses a regex-based approach that:
- Replaces fs.rm(path, { recursive, force }) → removeWithRetries(path)
- Replaces fs.rmSync(path, { recursive, force }) → removeSyncWithRetries(path)
- Replaces fs.rm(path) → removeWithRetries(path) (no options)
- Skips fs.rm/fs.rmSync inside template literals (bun --eval scripts)
- Adds imports to existing @oh-my-pi/pi-utils import or creates new one
- Removes unused fs imports where fs.rm was the only fs usage (4 files)
2026-06-23 15:28:05 -07:00
roboomp 6cac1d06a4 fix(providers): detected lm studio vlm inputs
Queried LM Studio native /api/v0/models metadata during catalog and runtime discovery so type=vlm models advertise image input. Added regressions for both provider-manager and runtime discovery paths.\n\nFixes #2945
2026-06-18 07:38:36 +00:00
danzaio 9c4d62b6ba docs(models): clarify oMLX local discovery 2026-06-10 08:26:00 +02:00
danzaio b36f5c0785 docs(models): document oMLX OpenAI-compatible setup 2026-06-10 08:26:00 +02:00
can1357 eb1a46baf5 feat: added injectable fetch transport across AI and coding network flows
- Added optional FetchImpl fields to compaction, proxy, AI, coding-agent, and mnemopi options.
- Threaded injected fetch implementations through OAuth, discovery, and search/LLM request flows.
- Removed exported hookFetch utility and its package entrypoint from utils.
- Replaced global-fetch test monkeypatching with per-test FetchImpl mocks across test suites.
2026-06-09 04:51:17 +02:00
can1357 975941aba4 chore: remove garbage tests 2026-05-12 04:09:33 +02:00
can1357 2f151fea9a fix(tests): added resource cleanup methods and initiatorOverride support
- Added `close()` method to SessionManager and AuthStorage for proper resource cleanup and finalization of prepared statements.
- Added `initiatorOverride` option support in OpenAI and Anthropic providers for message attribution control.
- Fixed resource leaks in RpcClient timeout handling by centralizing timeout creation with unref() and adding explicit clearTimeout() calls.
- Fixed AgentSession disposal to call SessionManager's `close()` method for guaranteed resource cleanup instead of fallback flush.
- Updated all test suites to properly dispose AuthStorage instances in cleanup hooks to prevent resource leaks between tests.
2026-03-14 11:25:40 +01:00
can1357 005401e82a refactor: extracted fetch mocking into reusable hookFetch utility
- Extracted fetch mocking logic into reusable `hookFetch()` utility function with middleware-style handler pattern.
- Replaced manual `globalThis.fetch` assignment and restoration across 10 test files with `hookFetch()` calls using `using` statement for automatic cleanup.
- Implemented Disposable pattern with Symbol.dispose for fetch hook resource management, eliminating try-finally blocks.
- Exported `hookFetch` from utils public API to enable consistent fetch mocking across packages.
2026-03-08 16:16:54 +01:00
can1357 59ae4ff707 test(coding-agent): updated mock fetch to filter endpoints and ignore concurrent discovery
- Updated mock fetch handler to filter test endpoints and ignore concurrent provider discovery requests.
2026-03-08 15:59:06 +01:00
can1357 7b4ab548c0 fix: corrected URI template expansion and MCP notification epoch handling
- Fixed URI template matching to handle empty string expansions in MCP resource queries.
- Fixed LM Studio URL validation to preserve invalid baseUrl instead of applying localhost fallback.
- Fixed MCP notification epoch handling to prevent unsubscribe calls when old subscriptions resolve after re-enabling.
- Extracted hardcoded LM Studio base URL to named constant for improved maintainability.
- Refactored notification epoch check logic for improved code clarity and readability.
2026-03-03 03:56:30 +01:00
can1357 019c593782 fix: resolve merged regression set across coding-agent and ai
- Normalize LM Studio discovery URLs to avoid duplicated /v1 segments
- Harden status-line PR cache with branch+repo context validation and guarded async writes
- Apply Foundry auth precedence correctly and preserve system trust roots when custom CA is provided
- Split Copilot premium multiplier handling by plan tier while preserving agent-initiated zero billing
- Catch MCP notification refresh failures and route read_resource via deterministic full template matching
- Add regression tests for each fix cluster and keep targeted suites green
2026-03-03 03:39:19 +01:00
Sage Grigull 02ebc5e8e1 add LM Studio support (#259)
* feat: Add LM Studio as a supported model provider with OpenAI-compatible API fetching and discovery.

Add LM Studio as a supported AI provider with optional API key, environment variables, and discovery.

* feat: Add rustup as a dev dependency.

* fix: Refine LM Studio API key handling to conditionally send authorization headers during model discovery based on whether the key is a default local token or a custom key, and add new tests.

* feat: Enhance OAuth token and account ID resolution for model providers in the model registry.

* rebase for packages/ai/CHANGELOG.md

* feat: improve implicit model discovery to independently auto-detect Ollama and LM Studio, and refine LM Studio base URL handling.

---------

Co-authored-by: Can Bölük <can1357@users.noreply.github.com>
2026-03-03 03:26:57 +01:00