Learning Record learning from practice

· ai

LiteLLM

Code Flow:

_prepare_completion_kwargs() # litellm.llms.anthropic.experimental_pass_through.adapters.handler
  translate_completion_input_params() # litellm.llms.anthropic.experimental_pass_through.adapters.transformation
    translate_anthropic_to_openai()
      translatable_anthropic_params()
  • _prepare_completion_kwargs to exclude output_config to resolve output_config issue.
  • litellm.llms.openai.openai
    • async_streaming -> make_openai_chat_completion_request to force add data["reasoning_effort"] = "none" to resolve reasoning_effort issue.

Should set CLAUDE_CODE_USE_BEDROCK=0 or no set it because it is for bedrock.

Should set CLAUDE_CODE_AUTO_MODE_SERVER=0 to avoid https://code.claude.com/docs/en/auto-mode-classifier-billing.