[GH-ISSUE #11660] Configure different properties for each model in Ollama serve side #7708

Open
opened 2026-04-12 19:48:49 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @aaronpliu on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11660

Is it possible to control model behavior in ollama side and do not allow client to update?
For example: OLLAMA_KEEP_ALIVE, CONTEXT_LENGTH, Alias of model, API endpoints...

If have more control in ollama side, then it's more secure to manage API request

Originally created by @aaronpliu on GitHub (Aug 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11660 Is it possible to control model behavior in ollama side and do not allow client to update? For example: OLLAMA_KEEP_ALIVE, CONTEXT_LENGTH, Alias of model, API endpoints... If have more control in ollama side, then it's more secure to manage API request
GiteaMirror added the feature request label 2026-04-12 19:48:49 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 5, 2025):

Use the OpenAI API compatibility endpoints to prevent clients from changing model parameters.

<!-- gh-comment-id:3153775569 --> @rick-github commented on GitHub (Aug 5, 2025): Use the OpenAI API [compatibility endpoints](https://github.com/ollama/ollama/blob/main/docs/openai.md) to prevent clients from changing model parameters.
Author
Owner

@aaronpliu commented on GitHub (Aug 5, 2025):

No, it cannot prevent clients from changing, unless ollama control it.

<!-- gh-comment-id:3153875575 --> @aaronpliu commented on GitHub (Aug 5, 2025): No, it cannot prevent clients from changing, unless ollama control it.
Author
Owner

@rick-github commented on GitHub (Aug 5, 2025):

Clients cannot change keep_alive or num_ctx if they use the API compatibility endpoints.

<!-- gh-comment-id:3153924299 --> @rick-github commented on GitHub (Aug 5, 2025): Clients cannot change keep_alive or num_ctx if they use the API compatibility endpoints.
Author
Owner

@aaronpliu commented on GitHub (Aug 6, 2025):

If using client (web or IDE plugin) to access ollama via API. I found "continue" plugin of VSCode will override keep_alive, context_length.

<!-- gh-comment-id:3157171357 --> @aaronpliu commented on GitHub (Aug 6, 2025): If using client (web or IDE plugin) to access ollama via API. I found "continue" plugin of VSCode will override keep_alive, context_length.
Author
Owner

@rick-github commented on GitHub (Aug 6, 2025):

Change the plugin to use the OpenAI endpoint and it will not override keep_alive, context_length.

<!-- gh-comment-id:3157174637 --> @rick-github commented on GitHub (Aug 6, 2025): Change the plugin to use the OpenAI endpoint and it will not override keep_alive, context_length.
Author
Owner

@aaronpliu commented on GitHub (Feb 27, 2026):

It cannot prevent "Continue" plugin from changing ollama serve's parameters with openai-compatible endpoints.
https://github.com/continuedev/continue/issues/5721

<!-- gh-comment-id:3971112788 --> @aaronpliu commented on GitHub (Feb 27, 2026): It cannot prevent "Continue" plugin from changing ollama serve's parameters with openai-compatible endpoints. https://github.com/continuedev/continue/issues/5721
Author
Owner

@rick-github commented on GitHub (Feb 27, 2026):

Clients cannot change keep_alive or num_ctx if they use the OpenAI API compatibility endpoints.

<!-- gh-comment-id:3972368895 --> @rick-github commented on GitHub (Feb 27, 2026): Clients cannot change keep_alive or num_ctx if they use the OpenAI API compatibility endpoints.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7708