Skip to content

session_setup: show resolved default model in chat status line#63

Closed
TroyHernandez wants to merge 1 commit into
mainfrom
show-default-model
Closed

session_setup: show resolved default model in chat status line#63
TroyHernandez wants to merge 1 commit into
mainfrom
show-default-model

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

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

  • All 1235 corteza tests pass locally
  • Verified end-to-end: `session_setup(cwd = "/home/troy/tiny")` resolves `model_map$cloud` to `"kimi-k2"` with the moonshot config

…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.
@TroyHernandez TroyHernandez marked this pull request as draft May 8, 2026 21:41
@TroyHernandez
Copy link
Copy Markdown
Contributor Author

Blocked on llm.api 0.1.3 reaching CRAN. provider_default_model() was added on llm.api main but isn't on CRAN/r2u yet, so CI installs the older 0.1.1 and fails. Holding this draft until the dependency lands.

@TroyHernandez TroyHernandez deleted the show-default-model branch May 14, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant