Skip to content

Feat/1566 display factors in model list#1567

Merged
deathbeam merged 5 commits into
CopilotC-Nvim:mainfrom
rakotomandimby:feat/1566_display_factors_in_model_list
May 25, 2026
Merged

Feat/1566 display factors in model list#1567
deathbeam merged 5 commits into
CopilotC-Nvim:mainfrom
rakotomandimby:feat/1566_display_factors_in_model_list

Conversation

@rakotomandimby
Copy link
Copy Markdown
Contributor

@rakotomandimby rakotomandimby commented May 25, 2026

Closes #1566

rakotomandimby and others added 5 commits May 25, 2026 22:18
Expose the 'multiplier' field from model billing configuration into the
provider definitions. This change allows the plugin to track and display
usage cost multipliers for specific LLM models.

Changes include:
- Updating providers.lua to pull 'multiplier' from billing data.
- Updating init.lua to propagate the multiplier to the model selection UI.
- Adding a visual indicator in the model picker to show the multiplier.

Notable behavior change:
The model selection menu will now display billing multipliers, such as
'[x2]', next to supported models.

Testing:
Verify the model selector displays the multiplier correctly when a model
has billing information defined:
:lua print(vim.inspect(require('CopilotChat.config.providers').copilot))
Check that models without billing info remain unaffected.
Update the model selection interface to explicitly display 'x not
specified' when a model multiplier is undefined.

Previously, missing multipliers resulted in no indicator being shown.
This change ensures visual consistency in the status line or UI components
that list model configurations.

Notable change:
- The string 'x not specified' will now appear in the indicators table
when a multiplier is nil.

Testing:
- Open the model selection menu and verify that models without a
defined multiplier now show the fallback text instead of being empty.
Refactored the provider and UI logic for model selection.

What changed:
- Removed the log.info call for Copilot models in providers.lua as it
added unnecessary noise to the logs.
- Simplified the 'select_model' logic in init.lua by removing the
conditional fallback for missing multipliers.

Notable behavior changes:
- Models without a multiplier will no longer show 'x not specified' in the
picker list.

Testing:
- Check that the model picker still renders correctly.
- Verify that logs are clean during model fetching.
@rakotomandimby
Copy link
Copy Markdown
Contributor Author

This PR is to have the multipliers in the model list:
image

@deathbeam deathbeam merged commit 7cdc9c1 into CopilotC-Nvim:main May 25, 2026
4 checks passed
@deathbeam
Copy link
Copy Markdown
Collaborator

thanks!

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.

":CopilotChatModels" : display factors (multipliers)

2 participants