Copilot commented on code in PR #3350:
URL: https://github.com/apache/tika/pull/3350#discussion_r4269611868
##########
docs/modules/ROOT/pages/configuration/parsers/vlm-parsers.adoc:
##########
@@ -245,6 +245,10 @@ trusted callers. See
<<_per_request_configuration,Per-request configuration>>.
|`completionsPath`
|`/v1/chat/completions` (OpenAI/vLLM only)
|HTTP path appended to `baseUrl` for the chat-completions endpoint. Used by
the OpenAI-compatible parser only. Claude and Gemini hardcode their own API
paths (`/v1/messages` and `/v1beta/models/\{model}:generateContent`
respectively) and ignore this field.
+
+|`useMaxCompletionTokens`
+|`false` (OpenAI/vLLM only)
+|Send the output limit as `max_completion_tokens` instead of `max_tokens`.
Required for OpenAI / Azure OpenAI models that reject `max_tokens` (o-series,
GPT-5 and later); leave `false` for servers that only accept `max_tokens`.
Review Comment:
The standalone `|` line inside the table is likely to create a
malformed/uneven table row (the table appears to have 3 columns). If you
intended visual spacing between rows, remove the blank row entirely, or use a
properly sized empty row (e.g., provide the correct number of cell delimiters
for all columns) so the table renders consistently.
##########
tika-parsers/tika-parsers-ml/tika-vlm/src/main/java/org/apache/tika/parser/vlm/VLMOCRConfig.java:
##########
@@ -61,6 +61,13 @@ public class VLMOCRConfig implements Serializable {
/** Maximum number of tokens the model may generate. */
private int maxTokens = 4096;
+ /**
+ * OpenAI-compatible parser only: send the limit as {@code
max_completion_tokens}
+ * instead of {@code max_tokens}. Newer OpenAI models (o-series, GPT-5 and
later)
+ * reject {@code max_tokens}; many other compatible servers only accept it.
Review Comment:
The Javadoc hard-codes specific model family/product claims (e.g., “GPT-5
and later”), which is likely to become stale or disputed over time. Consider
rewording to avoid forward-looking product names (e.g., “some newer OpenAI
models (including o-series)”) and keep the guidance focused on the API contract
(endpoints that reject `max_tokens`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]