Repository navigation
feat: add ability to disable providers auto-update from catwalk - #866
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
hi guys anything shaking with this? ððŧ |
|
Thanks for your patience with this one, everyoneâwe do plan on merging this one soon. |
83aaba5 to
8881835
Compare
8881835 to
cbded59
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to disable automatic provider updates from the Catwalk service, addressing corporate network restrictions and allowing offline usage. When disabled, Crush uses cached or embedded providers instead of fetching from remote sources.
Key changes:
- Added configuration option to disable provider auto-updates via environment variable or config file
- Implemented
update-providerscommand for manual provider management - Refactored provider loading logic to respect the disable flag and handle offline scenarios
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schema.json | Added disable_providers_auto_update boolean field to configuration schema |
| internal/config/config.go | Added DisableProvidersAutoUpdate field to Options struct |
| internal/config/load.go | Added environment variable parsing for the disable flag |
| internal/config/provider.go | Refactored provider loading with disable logic and added UpdateProviders function |
| internal/config/provider_test.go | Updated test calls to include new autoUpdateDisabled parameter |
| internal/config/provider_empty_test.go | Updated test calls to include new autoUpdateDisabled parameter |
| internal/cmd/update_providers.go | New command implementation for manual provider updates |
| internal/cmd/root.go | Added update-providers command to CLI |
| internal/tui/components/dialogs/models/models.go | Updated provider loading call to pass config |
| internal/tui/components/dialogs/models/list.go | Updated provider loading calls to pass config |
| internal/tui/components/chat/splash/splash.go | Updated provider loading call to pass config |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
It would be really great if this PR could be merged |
adb0e27 to
aeb71ff
Compare
|
This is ready to be reviewed. I suggest to test locally the different scenarios. (I tested carefully myself and for me it's stable). Also, review the README content and let me know if it's clear. |
| // NOTE(@andreynering): This style is more-or-less copied from Fang's | ||
| // error message, adapted for success. | ||
| headerStyle := lipgloss.NewStyle(). | ||
| Foreground(charmtone.Butter). | ||
| Background(charmtone.Guac). | ||
| Bold(true). | ||
| Padding(0, 1). | ||
| Margin(1). | ||
| MarginLeft(2). | ||
| SetString("SUCCESS") | ||
| textStyle := lipgloss.NewStyle(). | ||
| MarginLeft(2). | ||
| SetString("Providers updated successfully.") | ||
|
|
||
| fmt.Printf("%s\n%s\n\n", headerStyle.Render(), textStyle.Render()) | ||
| return nil |
There was a problem hiding this comment.
We could have this natively on Fang maybe.
Basically, a function to print success (maybe warning, info, ...) messages in the same style as the error message in case an error is returned.
We're very close. We'll most likely merge tomorrow and cut a release same day. |
|
I hate to hold this up anymore but testing this, I have a slight concern, particularly for new users. Is that by default, if you can't access the catwalk service, you looks like you still just get hit with an error. so one would need to know about setting I think it would be helpful to either communicate the existence of this option to users in the error message, or fallback to enabling |
e1d5e92 to
d50785d
Compare
|
Hey @jamestrew. That was a great suggestion. What about this?
|
That looks good to me ð |
d50785d to
f944651
Compare

embeddedpackage to allow offline functionality catwalk#48Some people reported that they can't access Catwalk due to corporate restrictions on internet access, etc.
This PR adds the ability to disable Catwalk. Once disabled, Crush will use the latest available providers from the library, which might be outdated, but should still work if the Crush version is enough up-to-date.
Disabling providers updates
Disabling via ENV:
Disabling via config:
Manually updating providers
Screenshots
Success output:
Error output: