Add ModelCapabilities (capabilities: Map<String, ModelCapabilities>?)
to ModelProvider matching backend /api/model/options shape
{model: {fast, reasoning, can_disable_reasoning}}. Nullable/defaulted
for backward compat with old backends (ignoreUnknownKeys+SnakeCase).
Chat composer: gate reasoning dropdown on can_disable_reasoning and
supportsReasoning — "None" disabled with "reasoning always on" hint
when can_disable==false, chip disabled with "No reasoning" when
reasoning==false. Missing keys offer full scale.
Sync currentModelCapabilities from cachedModelOptions on
SessionInfo, resume, preload/refresh, and optimistic /model swap;
clear on resetSessionState. Used by ComposerToolbar via ChatScreen.
Model picker: surface same hints in ModelPickerDialog (pinned+all)
and ModelScreen ProviderCard.
Verified: ktlintCheck OK, compileDebugKotlin OK (rerun-tasks).
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
90c07e0aee
commit
e9f2c726e4
7 files changed
+168
-27
No files matched your search
@@ -18,6 +18,14 @@ data class ModelProvider(
|
||||
val authenticated: Boolean? = null,
|
||||
val auth_type: String? = null,
|
||||
val warning: String? = null,
|
||||
val capabilities: Map<String, ModelCapabilities>? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ModelCapabilities(
|
||||
val fast: Boolean? = null,
|
||||
val reasoning: Boolean? = null,
|
||||
val can_disable_reasoning: Boolean? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
||||
Reference in new issue
Block a user