-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: respect Ollama Modelfile num_ctx configuration #7798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f2339e8
2af47b2
02afe40
a855bf4
0c436e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,12 @@ export type ApiHandlerOptions = Omit<ProviderSettings, "apiProvider"> & { | |
| * Defaults to true; set to false to disable summaries. | ||
| */ | ||
| enableGpt5ReasoningSummary?: boolean | ||
| /** | ||
| * Optional override for Ollama's num_ctx parameter. | ||
| * When set, this value will be used in Ollama chat requests. | ||
| * When undefined, Ollama will use the model's default num_ctx from the Modelfile. | ||
| */ | ||
| ollamaNumCtx?: number | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this intentional that we're not adding this field to the ProviderSettings type in packages/types? Without that, the field won't be properly validated when settings are saved/loaded.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these be added to the ProviderSettings? |
||
| } | ||
|
|
||
| // RouterName | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding tests for edge cases like negative numbers or extremely large values for
ollamaNumCtx. Validation tests would help ensure the field only accepts reasonable values.