pi-free 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,85 +1,85 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ## [1.0.5] - 2025-04-03
11
-
12
- ### Fixed
13
- - **NVIDIA provider non-chat model filtering** (comment/implementation mismatch)
14
- - Added modalities-based filtering to exclude embedding, speech-to-text, OCR, and image-gen models
15
- - Filters models where `output` is not `["text"]` (e.g., image generation like `black-forest-labs/flux.1-dev`)
16
- - Filters models where `input` lacks `"text"` (e.g., OCR like `nvidia/nemoretriever-ocr-v1`, speech-to-text like `openai/whisper-large-v3`)
17
- - Updated file comment to accurately describe the filtering behavior
18
- - Added 8 comprehensive unit tests for model filtering logic
19
-
20
- ## [1.0.4] - 2025-04-03
21
-
22
- ### Fixed
23
- - **All tests now passing** (127/127)
24
- - Fixed mock paths in kilo.test.ts, zen.test.ts, ollama.test.ts
25
- - Fixed createCtxReRegister mocks in zen.test.ts and openrouter.test.ts
26
- - Fixed cline.test.ts to test actual provider re-registration behavior
27
- - Added missing DEFAULT_MIN_SIZE_B constant to openrouter mock
28
-
29
- ### Changed
30
- - **Code quality improvements**
31
- - Refactored usage modules to break circular dependency (limits.ts ↔ formatters.ts)
32
- - Created usage/types.ts with shared interfaces (FreeTierLimit, FreeTierUsage)
33
- - Bumped version to 1.0.4
34
-
35
- ## [1.0.3] - 2025-04-03
36
-
37
- ### Changed
38
- - Updated package.json metadata (name, description, keywords, repository URL)
39
- - Updated .npmignore for cleaner publishes
40
-
41
- ## [1.0.0] - 2024-03-28
42
-
43
- ### Added
44
- - Initial release with 6 providers: Kilo, Zen, OpenRouter, NVIDIA, Cline, Fireworks
45
- - Free tier usage tracking across all sessions
46
- - Provider failover with model hopping
47
- - Autocompact integration for rate limit recovery
48
- - Usage widget with glimpseui
49
- - Command toggles for free/all model filtering
50
- - Hardcoded benchmark data from Artificial Analysis
51
-
52
- ### Changed
53
- - **Major refactoring**: Split free-tier-limits.ts into usage/* modules
54
- - usage/tracking.ts - runtime session tracking
55
- - usage/cumulative.ts - persistent storage
56
- - usage/formatters.ts - display formatting
57
- - 77% line reduction (741 → 166 lines)
58
- - **Major refactoring**: Split usage-widget.ts into widget/* modules
59
- - widget/data.ts - data collection
60
- - widget/format.ts - formatting utilities
61
- - widget/render.ts - HTML generation
62
- - 74% line reduction (~350 → 90 lines)
63
- - **Refactoring**: Extracted functions from cline-auth.ts
64
- - fetchAuthorizeUrl() - auth URL fetching
65
- - waitForAuthCode() - callback handling
66
- - exchangeCodeForTokens() - token exchange
67
- - parseManualInput() - manual input parsing
68
- - **Refactoring**: Simplified model-hop.ts complexity
69
- - Extracted handleDowngradeDecision()
70
- - Extracted tryAlternativeModel()
71
- - **Deduplication**: Created shared modules
72
- - lib/json-persistence.ts - file I/O with caching
73
- - lib/logger.ts - structured logging
74
- - providers/model-fetcher.ts - OpenRouter-compatible fetching
75
- - Replaced ~30 console.log statements with structured logging
76
- - Fixed all 9 pre-existing test failures
77
- - fetchWithRetry now throws after last retry
78
- - Fixed auth pattern matching (added key.*not.*valid)
79
- - Updated capability ranking tests
80
- - Added resetUsageStats() for test isolation
81
-
82
- ### Fixed
83
- - fetchWithRetry() now properly throws after exhausting retries
84
- - Auth error pattern matching now handles more message variants
85
- - Test isolation for free-tier-limits tests
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.5] - 2025-04-03
11
+
12
+ ### Fixed
13
+ - **NVIDIA provider non-chat model filtering** (comment/implementation mismatch)
14
+ - Added modalities-based filtering to exclude embedding, speech-to-text, OCR, and image-gen models
15
+ - Filters models where `output` is not `["text"]` (e.g., image generation like `black-forest-labs/flux.1-dev`)
16
+ - Filters models where `input` lacks `"text"` (e.g., OCR like `nvidia/nemoretriever-ocr-v1`, speech-to-text like `openai/whisper-large-v3`)
17
+ - Updated file comment to accurately describe the filtering behavior
18
+ - Added 8 comprehensive unit tests for model filtering logic
19
+
20
+ ## [1.0.4] - 2025-04-03
21
+
22
+ ### Fixed
23
+ - **All tests now passing** (127/127)
24
+ - Fixed mock paths in kilo.test.ts, zen.test.ts, ollama.test.ts
25
+ - Fixed createCtxReRegister mocks in zen.test.ts and openrouter.test.ts
26
+ - Fixed cline.test.ts to test actual provider re-registration behavior
27
+ - Added missing DEFAULT_MIN_SIZE_B constant to openrouter mock
28
+
29
+ ### Changed
30
+ - **Code quality improvements**
31
+ - Refactored usage modules to break circular dependency (limits.ts ↔ formatters.ts)
32
+ - Created usage/types.ts with shared interfaces (FreeTierLimit, FreeTierUsage)
33
+ - Bumped version to 1.0.4
34
+
35
+ ## [1.0.3] - 2025-04-03
36
+
37
+ ### Changed
38
+ - Updated package.json metadata (name, description, keywords, repository URL)
39
+ - Updated .npmignore for cleaner publishes
40
+
41
+ ## [1.0.0] - 2024-03-28
42
+
43
+ ### Added
44
+ - Initial release with 6 providers: Kilo, Zen, OpenRouter, NVIDIA, Cline, Fireworks
45
+ - Free tier usage tracking across all sessions
46
+ - Provider failover with model hopping
47
+ - Autocompact integration for rate limit recovery
48
+ - Usage widget with glimpseui
49
+ - Command toggles for free/all model filtering
50
+ - Hardcoded benchmark data from Artificial Analysis
51
+
52
+ ### Changed
53
+ - **Major refactoring**: Split free-tier-limits.ts into usage/* modules
54
+ - usage/tracking.ts - runtime session tracking
55
+ - usage/cumulative.ts - persistent storage
56
+ - usage/formatters.ts - display formatting
57
+ - 77% line reduction (741 → 166 lines)
58
+ - **Major refactoring**: Split usage-widget.ts into widget/* modules
59
+ - widget/data.ts - data collection
60
+ - widget/format.ts - formatting utilities
61
+ - widget/render.ts - HTML generation
62
+ - 74% line reduction (~350 → 90 lines)
63
+ - **Refactoring**: Extracted functions from cline-auth.ts
64
+ - fetchAuthorizeUrl() - auth URL fetching
65
+ - waitForAuthCode() - callback handling
66
+ - exchangeCodeForTokens() - token exchange
67
+ - parseManualInput() - manual input parsing
68
+ - **Refactoring**: Simplified model-hop.ts complexity
69
+ - Extracted handleDowngradeDecision()
70
+ - Extracted tryAlternativeModel()
71
+ - **Deduplication**: Created shared modules
72
+ - lib/json-persistence.ts - file I/O with caching
73
+ - lib/logger.ts - structured logging
74
+ - providers/model-fetcher.ts - OpenRouter-compatible fetching
75
+ - Replaced ~30 console.log statements with structured logging
76
+ - Fixed all 9 pre-existing test failures
77
+ - fetchWithRetry now throws after last retry
78
+ - Fixed auth pattern matching (added key.*not.*valid)
79
+ - Updated capability ranking tests
80
+ - Added resetUsageStats() for test isolation
81
+
82
+ ### Fixed
83
+ - fetchWithRetry() now properly throws after exhausting retries
84
+ - Auth error pattern matching now handles more message variants
85
+ - Test isolation for free-tier-limits tests
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 pi-free-providers contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 pi-free-providers contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.