session_setup: show resolved default model in chat status line#63
Closed
TroyHernandez wants to merge 1 commit into
Closed
session_setup: show resolved default model in chat status line#63TroyHernandez wants to merge 1 commit into
TroyHernandez wants to merge 1 commit into
Conversation
…l name The chat status line was displaying "(provider default)" as a placeholder when the user didn't specify a model. With llm.api 0.1.3 exposing provider_default_model(), we can resolve the default upfront so the status line shows e.g. "kimi-k2 @ moonshot" instead.
Contributor
Author
|
Blocked on llm.api 0.1.3 reaching CRAN. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
corteza::chat()displayed `(provider default)` as a placeholder in the status line when no model was specified. Now resolves the provider's default upfront so callers see the actual model name.Before / After
```
corteza chat | (provider default) @ moonshot | 30 tools | /clear, /quit
```
becomes
```
corteza chat | kimi-k2 @ moonshot | 30 tools | /clear, /quit
```
Change
One line in `R/session_setup.R` adds a third fallback after the user-passed model and the project config's model:
```r
model <- model %||% config$model %||% llm.api::provider_default_model(provider)
```
Uses `llm.api::provider_default_model()` (added in llm.api 0.1.2.1, cornball-ai/llm.api#10) so corteza doesn't reach into llm.api internals.
The defensive `%||% "(provider default)"` placeholders in `R/chat.R:240` and `:340` are left in place — they're now unreachable under normal use, but a useful safety net if some future channel bypasses `session_setup`.
Test plan