Commit 6bf895b
fix(python): add model aliases to API + graceful port conflict handling
1. Model aliases in Python API (#74):
- `Model.from_pretrained("llama3.2:1b")` now works (was: only full names)
- Added `_MODEL_ALIASES` dict and `_resolve_model_name()` in __init__.py
- Same aliases as CLI: smollm2, llama3.2:1b, phi3.5:mini, etc.
2. Port conflict handling (#75):
- `quantcpp serve` now checks if port is in use before launching
- Shows: "error: port 8080 is already in use. Try --port 8081"
- Previously: SIGABRT crash with no error message
Fixes #74, #75
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 34e5539 commit 6bf895b
2 files changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
158 | 180 | | |
159 | 181 | | |
160 | 182 | | |
161 | 183 | | |
162 | 184 | | |
163 | 185 | | |
164 | | - | |
165 | | - | |
| 186 | + | |
| 187 | + | |
166 | 188 | | |
167 | 189 | | |
168 | 190 | | |
| |||
171 | 193 | | |
172 | 194 | | |
173 | 195 | | |
174 | | - | |
| 196 | + | |
175 | 197 | | |
176 | 198 | | |
| 199 | + | |
177 | 200 | | |
178 | 201 | | |
179 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
253 | 262 | | |
254 | 263 | | |
255 | 264 | | |
| |||
0 commit comments