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
Copy file name to clipboardExpand all lines: docs/docs/providers/responses/inline_builtin.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Metadata: {metadata}
76
76
|`vector_stores_config.contextual_retrieval_params.default_timeout_seconds`|`int`| No | 120 | Default timeout in seconds for each LLM contextualization call. |
77
77
|`vector_stores_config.contextual_retrieval_params.default_max_concurrency`|`int`| No | 3 | Default maximum concurrent LLM calls for contextualization. |
78
78
|`vector_stores_config.contextual_retrieval_params.max_document_tokens`|`int`| No | 100000 | Maximum document size in tokens. Documents exceeding this are rejected for contextual retrieval. |
79
-
| `compaction_config` | `CompactionConfig` | No | summarization_prompt='You are performing a CONTEXT CHECKPOINT COMPACTION. Create a handoff summary for another LLM that will resume the task.\n\nInclude:\n- Current progress and key decisions made\n- Important context, constraints, or user preferences\n- What remains to be done (clear next steps)\n- Any critical data, examples, or references needed to continue\n\nBe concise, structured, and focused on helping the next LLM seamlessly continue the work.' summary_prefix='Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:' summarization_model=None default_compact_threshold=None tokenizer_encoding=None | Configuration for conversation compaction behavior and prompt templates |
79
+
| `compaction_config` | `CompactionConfig` | No | summarization_prompt='You are performing a CONTEXT CHECKPOINT COMPACTION. Create a handoff summary for another LLM that will resume the task.\n\nInclude:\n- Current progress and key decisions made\n- Important context, constraints, or user preferences\n- What remains to be done (clear next steps)\n- Any critical data, examples, or references needed to continue\n\nBe concise, structured, and focused on helping the next LLM seamlessly continue the work.' summary_prefix='Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:' summarization_model=None default_compact_threshold=None tokenizer_encoding=None model_tokenizer_mappings={'llama': 'cl100k_base', 'mistral': 'cl100k_base', 'claude': 'cl100k_base', 'gemma': 'cl100k_base', 'qwen': 'cl100k_base', 'phi': 'cl100k_base', 'deepseek': 'cl100k_base'} | Configuration for conversation compaction behavior and prompt templates |
80
80
| `compaction_config.summarization_prompt` | `str` | No | You are performing a CONTEXT CHECKPOINT COMPACTION. Create a handoff summary for another LLM that will resume the task.
81
81
82
82
Include:
@@ -89,7 +89,8 @@ Be concise, structured, and focused on helping the next LLM seamlessly continue
89
89
|`compaction_config.summary_prefix`|`str`| No | Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis: | Text prepended to the compaction summary to frame it as a handoff for the next LLM. |
90
90
|`compaction_config.summarization_model`|`str \| None`| No || Model to use for generating compaction summaries. If not set, uses the same model as the conversation. |
91
91
|`compaction_config.default_compact_threshold`|`int \| None`| No || Default token threshold for auto-compaction via context_management. If set, conversations exceeding this token count will be automatically compacted. |
92
-
|`compaction_config.tokenizer_encoding`|`str \| None`| No || Tiktoken encoding name for token counting (e.g. 'o200k_base', 'cl100k_base'). If not set, the encoding is resolved from the model name via tiktoken.encoding_for_model(). |
92
+
|`compaction_config.tokenizer_encoding`|`str \| None`| No || Default tiktoken encoding name for token counting (e.g. 'o200k_base', 'cl100k_base'). Applied as a server-level default after any per-request override via extra_body. If not set, encoding is resolved from the model name via tiktoken, then model-family prefix mappings, then character-based estimation. |
93
+
|`compaction_config.model_tokenizer_mappings`|`dict[str, str]`| No |{'llama': 'cl100k_base', 'mistral': 'cl100k_base', 'claude': 'cl100k_base', 'gemma': 'cl100k_base', 'qwen': 'cl100k_base', 'phi': 'cl100k_base', 'deepseek': 'cl100k_base'}| Map model name prefixes to tiktoken encoding names. Used as a heuristic fallback when tiktoken cannot resolve the model name directly. Matching is case-insensitive on the model name after stripping any provider prefix (e.g., 'ollama/llama3.2:3b' matches the 'llama' prefix). Admins can extend this to support custom or fine-tuned models. |
93
94
|`moderation_endpoint`|`str \| None`| No || URL of an OpenAI-compatible /v1/moderations endpoint for guardrails. The endpoint must accept POST {"input": "text"} and return {"results": [{"flagged": bool, "categories": {...}}]}. |
0 commit comments