Commit ea54ac6
committed
fix: validate contextWindow against model capabilities before resolveApiModelId
- ClaudeTextGeneration.ts: pass normalized options (with validated contextWindow)
to resolveApiModelId instead of raw modelSelection
- ClaudeAdapter.ts: resolve contextWindow against model capabilities before
computing apiModelId in both startSession and sendTurn paths
- contracts/model.ts: use TrimmedNonEmptyString for ContextWindowOption.value
to match EffortOption pattern and prevent empty string values1 parent ff503d1 commit ea54ac6
File tree
3 files changed
+23
-5
lines changed- apps/server/src
- git/Layers
- provider/Layers
- packages/contracts/src
3 files changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
2732 | 2733 | | |
2733 | 2734 | | |
2734 | 2735 | | |
2735 | | - | |
2736 | | - | |
2737 | 2736 | | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
2738 | 2745 | | |
2739 | 2746 | | |
2740 | 2747 | | |
| |||
2899 | 2906 | | |
2900 | 2907 | | |
2901 | 2908 | | |
2902 | | - | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
2903 | 2918 | | |
2904 | 2919 | | |
2905 | 2920 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments