Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

@aibrahim-oai aibrahim-oai commented Dec 17, 2025

  • Load models from static file as a fallback
  • Make API users use this file directly
  • Add tests to make sure updates to the file always serialize

@aibrahim-oai aibrahim-oai changed the title Static fallback Load models from static file Dec 17, 2025
pub async fn refresh_available_models(&self, config: &Config) -> CoreResult<()> {
if !config.features.enabled(Feature::RemoteModels) {
if !config.features.enabled(Feature::RemoteModels)
|| self.auth_manager.get_auth_mode() == Some(AuthMode::ApiKey)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test the change first behind the feature?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say let's get more feedback

}

#[test]
fn bundled_models_json_roundtrips() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check that it actually roundtrips, deserialize/serialize check the same content. You'll catch fields that we missed that way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@aibrahim-oai aibrahim-oai merged commit 927a6ac into main Dec 17, 2025
24 of 26 checks passed
@aibrahim-oai aibrahim-oai deleted the static-fallback branch December 17, 2025 22:34
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants