You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key issue I noted was the documentation showed it should be possible to add a static model, but the capability was not yet there.
I needed static model support for myself as I was testing the new Qwen3.6 model. I went ahead and created a plan to add the support while still retaining the initial capability for the static models URL that was a part of the [[providers]] definition in the schema.
Project Structure Summary
This is taken directly from the implemented plan.
The implementation spans three key areas:
Schema Layer (forge.schema.json): JSON Schema definition for configuration validation
Config Layer (crates/forge_config/src/config.rs): Rust struct definitions with Serde deserialization
Repository Layer (crates/forge_repo/src/provider/provider_repo.rs): Internal model handling with Models enum
Support Custom Provider Configurations: So model parameters can be overridden
Maintain existing URL support: for discovery endpoints
Make models endpoint graceful: to eliminate failures if there is no such endpoint on a custom provider
Outcome
This fix worked for me to locally support model configuration parameters including crucially modifying the context windows when the values were not presented by oMLX.
I'm going to update this PR with an additional enhancement. I realized in further testing that the models endpoint is still being required even with custom providers. This causes custom providers to fail unless they provide an expected models API endpoint.
I'm making the models endpoint check optional for the custom provider so it doesn't fail in the case there is no such endpoint.
I'm going to update this PR with an additional enhancement. I realized in further testing that the models endpoint is still being required even with custom providers. This causes custom providers to fail unless they provide an expected models API endpoint.
I'm making the models endpoint check optional for the custom provider so it doesn't fail in the case there is no such endpoint.
sure moving it to draft. Mark it ready for review once done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
See my original issue and the initial feature request that I noted was related.
The key issue I noted was the documentation showed it should be possible to add a static model, but the capability was not yet there.
I needed static model support for myself as I was testing the new Qwen3.6 model. I went ahead and created a plan to add the support while still retaining the initial capability for the static
modelsURL that was a part of the[[providers]]definition in the schema.Project Structure Summary
This is taken directly from the implemented plan.
The implementation spans three key areas:
forge.schema.json): JSON Schema definition for configuration validationcrates/forge_config/src/config.rs): Rust struct definitions with Serde deserializationcrates/forge_repo/src/provider/provider_repo.rs): Internal model handling withModelsenumRelevant Files
forge.schema.json:613-689ProviderEntryschemamodelsaccepts onlystring | nullcrates/forge_config/src/config.rs:69-99ProviderEntrystructmodels: Option<String>crates/forge_repo/src/provider/provider_repo.rs:13-21ModelsenumUrlandHardcodedcrates/forge_domain/src/model.rs:23-38Modelstructcrates/forge_repo/src/provider/provider.jsonTarget State
modelsendpoint graceful: to eliminate failures if there is no such endpoint on a custom providerOutcome
This fix worked for me to locally support model configuration parameters including crucially modifying the context windows when the values were not presented by oMLX.