mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
refactor: Refactor "anthropic-beta" header value to a constant
This commit is contained in:
parent
94c4b59f9e
commit
0f09bd7fb3
1 changed files with 3 additions and 2 deletions
|
@ -17,6 +17,7 @@ from aider.dump import dump # noqa: F401
|
||||||
from aider.llm import AIDER_APP_NAME, AIDER_SITE_URL, litellm
|
from aider.llm import AIDER_APP_NAME, AIDER_SITE_URL, litellm
|
||||||
|
|
||||||
DEFAULT_MODEL_NAME = "gpt-4o"
|
DEFAULT_MODEL_NAME = "gpt-4o"
|
||||||
|
ANTHROPIC_BETA_HEADER = "max-tokens-3-5-sonnet-2024-07-15, prompt-caching-2024-07-31"
|
||||||
|
|
||||||
OPENAI_MODELS = """
|
OPENAI_MODELS = """
|
||||||
gpt-4
|
gpt-4
|
||||||
|
@ -271,7 +272,7 @@ MODEL_SETTINGS = [
|
||||||
accepts_images=True,
|
accepts_images=True,
|
||||||
max_tokens=8192,
|
max_tokens=8192,
|
||||||
extra_headers={
|
extra_headers={
|
||||||
"anthropic-beta": "max-tokens-3-5-sonnet-2024-07-15, prompt-caching-2024-07-31",
|
"anthropic-beta": ANTHROPIC_BETA_HEADER,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ModelSettings(
|
ModelSettings(
|
||||||
|
@ -282,7 +283,7 @@ MODEL_SETTINGS = [
|
||||||
examples_as_sys_msg=True,
|
examples_as_sys_msg=True,
|
||||||
max_tokens=8192,
|
max_tokens=8192,
|
||||||
extra_headers={
|
extra_headers={
|
||||||
"anthropic-beta": "max-tokens-3-5-sonnet-2024-07-15, prompt-caching-2024-07-31",
|
"anthropic-beta": ANTHROPIC_BETA_HEADER,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ModelSettings(
|
ModelSettings(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue