Commit 48cf2ce
Fix PR #2001: Critical typos and token configuration for reasoning models
## Summary
- Fixed critical typos in PromptLibrary methods that prevented code generation
- Corrected token limits and reasoning model detection
- Enhanced provider-specific token handling
## Changes
### Fixed Critical Typos
- Fixed method name typo: getPropmtFromLibrary → getPromptFromLibrary
- Fixed error message typo: "Prompt Now Found" → "Prompt Not Found"
- These typos were preventing prompt retrieval and causing empty file generation
### Token Configuration
- Set conservative MAX_TOKENS to 32000 for universal compatibility
- Added provider-specific completion limits with accurate values
- Anthropic models now correctly configured with 64000 token limit
- Three-tier token system: model-specific → provider defaults → global fallback
### Model Classification
- Reasoning models (o1, o3, gpt-5, etc.) properly identified
- Correct token parameter usage (maxCompletionTokens vs maxTokens)
- Fixed context window display for all models
### Provider Enhancements
- Fixed Anthropic provider context window detection
- Models now display accurate context limits (e.g., 64k for supported models)
- Dynamic model discovery improvements
## Test Results
- Verified prompt retrieval works correctly
- Token limits properly applied per provider
- All reasoning models correctly identified
- Context windows display accurately
This PR resolves the code generation issues in PR #2001 and ensures compatibility across all AI providers.
🤖 Generated with AI Assistant
Co-Authored-By: AI Assistant <noreply@anthropic.com>1 parent 08938c5 commit 48cf2ce
File tree
5 files changed
+13
-8
lines changed- app/lib
- .server/llm
- common
- modules/llm/providers
5 files changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
0 commit comments