Home / Function/ _merge_output_configs() — anthropic-sdk-python Function Reference

_merge_output_configs() — anthropic-sdk-python Function Reference

Architecture documentation for the _merge_output_configs() function in messages.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  618c478a_823f_e214_e25b_6e82a7278cf7["_merge_output_configs()"]
  16f9761f_052b_9813_1b8d_d40d64684eff["messages.py"]
  618c478a_823f_e214_e25b_6e82a7278cf7 -->|defined in| 16f9761f_052b_9813_1b8d_d40d64684eff
  34d38135_c378_e9a4_ba05_661bc9121152["create()"]
  34d38135_c378_e9a4_ba05_661bc9121152 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  1f77730a_8062_4443_ad97_1696c0294a47["parse()"]
  1f77730a_8062_4443_ad97_1696c0294a47 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  11f0e821_29f9_1b06_ca3c_9f9f9b07b9c7["stream()"]
  11f0e821_29f9_1b06_ca3c_9f9f9b07b9c7 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  c307d27a_5711_a0a0_93ca_406e62eb1e1d["count_tokens()"]
  c307d27a_5711_a0a0_93ca_406e62eb1e1d -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  4f341f73_cc7e_3e56_290e_28f6534e2a72["create()"]
  4f341f73_cc7e_3e56_290e_28f6534e2a72 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  875f19aa_d89c_b439_dca0_bf289f16dce2["parse()"]
  875f19aa_d89c_b439_dca0_bf289f16dce2 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  e626c920_4ef0_f218_ed25_ad7210b4668b["stream()"]
  e626c920_4ef0_f218_ed25_ad7210b4668b -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  03c0ff6f_1277_a16b_a3c8_419f98e2dec3["count_tokens()"]
  03c0ff6f_1277_a16b_a3c8_419f98e2dec3 -->|calls| 618c478a_823f_e214_e25b_6e82a7278cf7
  style 618c478a_823f_e214_e25b_6e82a7278cf7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/resources/beta/messages/messages.py lines 3726–3735

def _merge_output_configs(
    output_config: BetaOutputConfigParam | Omit,
    output_format: Optional[BetaJSONOutputFormatParam] | Omit,
) -> BetaOutputConfigParam | Omit:
    if is_given(output_format):
        if is_given(output_config):
            return {**output_config, "format": output_format}
        else:
            return {"format": output_format}
    return output_config

Subdomains

Frequently Asked Questions

What does _merge_output_configs() do?
_merge_output_configs() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/resources/beta/messages/messages.py.
Where is _merge_output_configs() defined?
_merge_output_configs() is defined in src/anthropic/resources/beta/messages/messages.py at line 3726.
What calls _merge_output_configs()?
_merge_output_configs() is called by 8 function(s): count_tokens, count_tokens, create, create, parse, parse, stream, stream.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free