[GH-ISSUE #11649] Option to exclude context from /api/generate response body #54211

Closed
opened 2026-04-29 05:23:42 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @leiDnedyA on GitHub (Aug 3, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11649

Hi! I would love an option to be able to exclude the context field from the response body when sending a POST request to /api/generate. Something like

{
  "model": "my-model",
  "stream": false,
  "includeContext": false, // this would be awesome
  "prompt": "How many w's in the word \"strawberry\"?"
}
Originally created by @leiDnedyA on GitHub (Aug 3, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11649 Hi! I would love an option to be able to exclude the `context` field from the response body when sending a POST request to `/api/generate`. Something like ```javascript { "model": "my-model", "stream": false, "includeContext": false, // this would be awesome "prompt": "How many w's in the word \"strawberry\"?" } ```
GiteaMirror added the feature request label 2026-04-29 05:23:42 -05:00
Author
Owner

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

Thecontext field is deprecated and will be removed in a future release. In the meantime, just ignore the field.

<!-- gh-comment-id:3148483072 --> @rick-github commented on GitHub (Aug 3, 2025): The`context` field is [deprecated](https://github.com/ollama/ollama/pull/7878) and will be removed in a future release. In the meantime, just ignore the field.
Author
Owner

@leiDnedyA commented on GitHub (Aug 3, 2025):

Good to know, thanks

<!-- gh-comment-id:3148500873 --> @leiDnedyA commented on GitHub (Aug 3, 2025): Good to know, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#54211