Module: LlmGateway::Adapters::OpenAICodex::OptionMapper

Defined in:
lib/llm_gateway/adapters/openai_codex/option_mapper.rb

Class Method Summary collapse

Class Method Details

.map(options) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/llm_gateway/adapters/openai_codex/option_mapper.rb', line 11

def map(options)
  mapped_options = OpenAI::Responses::OptionMapper.map(options)

  # Codex endpoint currently rejects token limit parameters.
  mapped_options.delete(:max_output_tokens)
  mapped_options.delete(:max_completion_tokens)

  # Codex transport does not use retention flags in the request body.
  mapped_options.delete(:prompt_cache_retention)
  mapped_options.delete(:cacheRetention)
  mapped_options.delete(:cache_retention)

  mapped_options
end