Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JXVi2GMQ7bR5EmbUFdDj7N
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
# Options: portable, provider-specific, and the per-call trap
|
|
|
|
A. ChatClient.options(ChatOptions.builder().temperature(0.2).maxTokens(200)) on each provider
|
|
OPENAI model=gpt-6.1-sol, max_tokens=200, temperature=0.2
|
|
ANTHROPIC max_tokens=200, model=claude-sonnet-5-5, temperature=0.2
|
|
GEMINI temperature=0.2, topP=1.0, maxOutputTokens=200
|
|
|
|
B. Provider-specific options through the same ChatClient call
|
|
OPENAI reasoningEffort + promptCacheKey -> prompt_cache_key=tickets-v1, reasoning_effort=low
|
|
ANTHROPIC topK(5) -> top_k=5
|
|
GEMINI thinkingBudget(0) -> generationConfig {"temperature":0.7,"topP":1.0,"thinkingConfig":{"thinkingBudget":0}}
|
|
|
|
C. The trap: one built ChatOptions object handed to Prompt, then model.call(prompt)
|
|
OPENAI ClassCastException (DefaultChatOptions cannot be cast to OpenAiChatOptions)
|
|
ANTHROPIC no error; model sent "claude-haiku-4-5", max_tokens 4096, temperature absent
|
|
GEMINI ClassCastException (DefaultChatOptions cannot be cast to GoogleGenAiChatOptions)
|
|
|
|
D. The other trap: OpenAI-specific options sent to the other two models
|
|
ANTHROPIC no error; model sent "claude-haiku-4-5"
|
|
GEMINI ClassCastException (OpenAiChatOptions cannot be cast to GoogleGenAiChatOptions)
|