@@ -42,6 +42,7 @@ values. Keys absent from the project file fall back to the global value.
4242 "config" : { ... },
4343 "providers" : { ... },
4444 "modelOverrides" : { ... },
45+ "favoriteModels" : [ ... ],
4546 "projects" : { ... },
4647 "commands" : { ... },
4748 "formatter" : { ... },
@@ -380,6 +381,69 @@ and `api_base` override the corresponding environment variables.
380381| ` models_blacklist ` | array | These model IDs are never offered. |
381382| ` options ` | object | Provider-specific passthrough options. |
382383
384+ ### Custom OpenAI-Compatible Providers
385+
386+ For OpenAI-compatible endpoints not in the built-in provider list (e.g.
387+ self-hosted gateways, internal LLM proxies), define them under the
388+ ` customProviders ` map. Each entry is a self-contained provider with its
389+ own base URL, API key, custom headers, and model catalog.
390+
391+ ``` json
392+ "customProviders" : {
393+ "my-gateway" : {
394+ "name" : " My Gateway" ,
395+ "apiBase" : " https://gateway.example.com/v1" ,
396+ "apiKey" : " {env:GATEWAY_API_KEY}" ,
397+ "headers" : {
398+ "X-Custom-Header" : " value"
399+ },
400+ "models" : {
401+ "model-1" : {
402+ "name" : " Model One" ,
403+ "contextWindow" : 128000 ,
404+ "maxOutputTokens" : 8192 ,
405+ "reasoningEffort" : " high" ,
406+ "variants" : {
407+ "max" : { "reasoningEffort" : " max" },
408+ "none" : { "reasoningEffort" : " none" }
409+ }
410+ }
411+ },
412+ "requestTimeoutSecs" : 300
413+ }
414+ }
415+ ```
416+
417+ ` CustomProviderDef ` fields:
418+
419+ | Field | Type | Description |
420+ | -------| ------| -------------|
421+ | ` name ` | string | Display name shown in the provider picker. |
422+ | ` apiBase ` | string | OpenAI-compatible base URL. Claurst appends ` /chat/completions ` . |
423+ | ` apiKey ` | string \| null | API key. Supports ` {env:VAR} ` substitution. ` null ` = no key. |
424+ | ` headers ` | object | Custom HTTP headers sent on every request. |
425+ | ` models ` | object | Model catalog local to this provider, keyed by model id. |
426+ | ` requestTimeoutSecs ` | number \| null | Per-provider request timeout override in seconds. |
427+
428+ ` CustomModelDef ` fields (inside ` models ` ):
429+
430+ | Field | Type | Description |
431+ | -------| ------| -------------|
432+ | ` name ` | string \| null | Display name shown in the model picker. |
433+ | ` contextWindow ` | number \| null | Total context window size in tokens. |
434+ | ` maxOutputTokens ` | number \| null | Maximum tokens the model can emit in one response. |
435+ | ` reasoningEffort ` | string \| null | Reasoning effort level (` "high" ` , ` "max" ` , ` "none" ` ). |
436+ | ` variants ` | object | Named variants that override specific fields. |
437+
438+ Adding a provider via the ` /add ` command:
439+
440+ ```
441+ /add my-gateway https://gateway.example.com/v1 {env:GATEWAY_API_KEY}
442+ ```
443+
444+ The map key (e.g. ` "my-gateway" ` ) becomes the provider id used in
445+ ` provider/model ` routing (e.g. ` my-gateway/model-1 ` ).
446+
383447---
384448
385449## Environment Variables
@@ -639,6 +703,13 @@ matches. They are defined in the `formatter` map:
639703 }
640704 },
641705
706+ // Pin frequently-used models to the top of the /model picker.
707+ "favoriteModels" : [
708+ " anthropic/claude-sonnet-4-6" ,
709+ " openai/gpt-4o" ,
710+ " nvidia/z-ai/glm-5.2"
711+ ],
712+
642713 // Custom slash commands
643714 "commands" : {
644715 "test" : {
@@ -657,3 +728,29 @@ matches. They are defined in the `formatter` map:
657728 }
658729}
659730```
731+
732+ ---
733+
734+ ## Favorite Models
735+
736+ Pin frequently-used models to the top of the ` /model ` picker by adding them to
737+ the ` favoriteModels ` array in ` settings.json ` :
738+
739+ ``` json
740+ "favoriteModels" : [
741+ " anthropic/claude-sonnet-4-6" ,
742+ " openai/gpt-4o" ,
743+ " nvidia/z-ai/glm-5.2"
744+ ]
745+ ```
746+
747+ Entries use the canonical ` "provider/model" ` format (the same key used by
748+ ` modelOverrides ` ). For the ` anthropic ` and ` free ` composite providers, the
749+ provider prefix is optional — the bare model id (` "claude-sonnet-4-6" ` ) is
750+ accepted too.
751+
752+ In the model picker, press ` f ` (or ` * ` ) to toggle favorite status on the
753+ highlighted model. Favorited models appear with a ★ prefix at the top of the
754+ list and persist across sessions in ` ~/.claurst/settings.json ` . Stale
755+ favorites (models no longer in the catalog) are hidden from the picker but
756+ kept in settings until you un-favorite them.
0 commit comments