Skip to content

Add provider_default_model() helper#10

Merged
TroyHernandez merged 1 commit into
mainfrom
provider-default-model
May 8, 2026
Merged

Add provider_default_model() helper#10
TroyHernandez merged 1 commit into
mainfrom
provider-default-model

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

Summary

Adds provider_default_model(provider) as an exported helper. Returns the model id chat() falls back to when no model is specified.

Motivation: corteza's chat() status line currently shows `(provider default)` as a placeholder when the user doesn't specify a model. With this helper, corteza can resolve the actual default upfront for display, without duplicating llm.api's lookup table or reaching into .get_provider_config() via `:::`.

Test plan

  • tinytest::test_package("llm.api") passes (56/56, including 5 new assertions covering all four supported providers + the unknown-provider error path)

Returns the model id chat() falls back to when no model is specified,
so client code (e.g., corteza's chat status line) can resolve the
default upfront without reaching into .get_provider_config().
@TroyHernandez TroyHernandez merged commit 83bac7e into main May 8, 2026
4 checks passed
@TroyHernandez TroyHernandez deleted the provider-default-model branch May 8, 2026 21:01
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