local-openai2anthropic 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  local-openai2anthropic: A proxy server that converts Anthropic Messages API to OpenAI API.
4
4
  """
5
5
 
6
- __version__ = "0.2.4"
6
+ __version__ = "0.2.5"
7
7
 
8
8
  from local_openai2anthropic.protocol import (
9
9
  AnthropicError,
@@ -49,11 +49,11 @@ def convert_anthropic_to_openai(
49
49
  system = anthropic_params.get("system")
50
50
  stop_sequences = anthropic_params.get("stop_sequences")
51
51
  stream = anthropic_params.get("stream", False)
52
- temperature = anthropic_params.get("temperature")
52
+ temperature = anthropic_params.get("temperature", 0.6)
53
53
  tool_choice = anthropic_params.get("tool_choice")
54
54
  tools = anthropic_params.get("tools")
55
55
  top_k = anthropic_params.get("top_k")
56
- top_p = anthropic_params.get("top_p")
56
+ top_p = anthropic_params.get("top_p", 0.95)
57
57
  thinking = anthropic_params.get("thinking")
58
58
  # metadata is accepted but not forwarded to OpenAI
59
59
 
@@ -406,7 +406,7 @@ async def _handle_with_server_tools(
406
406
  async with httpx.AsyncClient(timeout=settings.request_timeout) as client:
407
407
  try:
408
408
  # Log full request for debugging
409
- logger.info(f"Request body: {json.dumps(params, indent=2, default=str)[:3000]}")
409
+ logger.debug(f"Request body: {json.dumps(params, indent=2, default=str)[:3000]}")
410
410
 
411
411
  response = await client.post(url, headers=headers, json=params)
412
412
 
@@ -421,7 +421,7 @@ async def _handle_with_server_tools(
421
421
  )
422
422
 
423
423
  completion_data = response.json()
424
- logger.info(f"OpenAI response: {json.dumps(completion_data, indent=2)[:500]}...")
424
+ logger.debug(f"OpenAI response: {json.dumps(completion_data, indent=2)[:500]}...")
425
425
  from openai.types.chat import ChatCompletion
426
426
  completion = ChatCompletion.model_validate(completion_data)
427
427
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: local-openai2anthropic
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: A lightweight proxy server that converts Anthropic Messages API to OpenAI API
5
5
  Project-URL: Homepage, https://github.com/dongfangzan/local-openai2anthropic
6
6
  Project-URL: Repository, https://github.com/dongfangzan/local-openai2anthropic
@@ -55,6 +55,7 @@ This proxy translates Claude SDK calls to OpenAI API format in real-time, enabli
55
55
  - **Offline development** without cloud API costs
56
56
  - **Privacy-first AI** - data never leaves your machine
57
57
  - **Seamless model switching** between cloud and local
58
+ - **Web Search tool** - built-in Tavily web search for local models
58
59
 
59
60
  ---
60
61
 
@@ -1,19 +1,19 @@
1
- local_openai2anthropic/__init__.py,sha256=xPWXxEgbns2l2aiZzW0BDbNBkjcfXK-Ee-2ukgjQPKc,1059
1
+ local_openai2anthropic/__init__.py,sha256=IEn8YcQGsaEaCr04s3hS2AcgsIt5NU5Qa2C8Uwz7RdY,1059
2
2
  local_openai2anthropic/__main__.py,sha256=K21u5u7FN8-DbO67TT_XDF0neGqJeFrVNkteRauCRQk,179
3
3
  local_openai2anthropic/config.py,sha256=bnM7p5htd6rHgLn7Z0Ukmm2jVImLuVjIB5Cnfpf2ClY,1918
4
- local_openai2anthropic/converter.py,sha256=qp0LPJBTP0uAb_5l9VINZ03RAjmumxdquP6JqWXiZkQ,15779
4
+ local_openai2anthropic/converter.py,sha256=d-qYwtv6FIbpKSRsZN4jhnKM4D4k52la-_bpEYPTAS0,15790
5
5
  local_openai2anthropic/daemon.py,sha256=pZnRojGFcuIpR8yLDNjV-b0LJRBVhgRAa-dKeRRse44,10017
6
6
  local_openai2anthropic/daemon_runner.py,sha256=rguOH0PgpbjqNsKYei0uCQX8JQOQ1wmtQH1CtW95Dbw,3274
7
7
  local_openai2anthropic/main.py,sha256=5tdgPel8RSCn1iK0d7hYAmcTM9vYHlepgQujaEXA2ic,9866
8
8
  local_openai2anthropic/openai_types.py,sha256=jFdCvLwtXYoo5gGRqOhbHQcVaxcsxNnCP_yFPIv7rG4,3823
9
9
  local_openai2anthropic/protocol.py,sha256=vUEgxtRPFll6jEtLc4DyxTLCBjrWIEScZXhEqe4uibk,5185
10
- local_openai2anthropic/router.py,sha256=KDIsckdQLx78z5rmVX8Zhr5zWO9m_qB-BjQbTwWjj0s,40224
10
+ local_openai2anthropic/router.py,sha256=imzvgduneiniwHroTgeT9d8q4iF5GAuptaVP38sakUg,40226
11
11
  local_openai2anthropic/tavily_client.py,sha256=QsBhnyF8BFWPAxB4XtWCCpHCquNL5SW93-zjTTi4Meg,3774
12
12
  local_openai2anthropic/server_tools/__init__.py,sha256=QlJfjEta-HOCtLe7NaY_fpbEKv-ZpInjAnfmSqE9tbk,615
13
13
  local_openai2anthropic/server_tools/base.py,sha256=pNFsv-jSgxVrkY004AHAcYMNZgVSO8ZOeCzQBUtQ3vU,5633
14
14
  local_openai2anthropic/server_tools/web_search.py,sha256=1C7lX_cm-tMaN3MsCjinEZYPJc_Hj4yAxYay9h8Zbvs,6543
15
- local_openai2anthropic-0.2.4.dist-info/METADATA,sha256=nWz75h6XmZzWk3BdkMhTZNT0xlUmUSNmx2jgyFONS10,10040
16
- local_openai2anthropic-0.2.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
- local_openai2anthropic-0.2.4.dist-info/entry_points.txt,sha256=hdc9tSJUNxyNLXcTYye5SuD2K0bEQhxBhGnWTFup6ZM,116
18
- local_openai2anthropic-0.2.4.dist-info/licenses/LICENSE,sha256=X3_kZy3lJvd_xp8IeyUcIAO2Y367MXZc6aaRx8BYR_s,11369
19
- local_openai2anthropic-0.2.4.dist-info/RECORD,,
15
+ local_openai2anthropic-0.2.5.dist-info/METADATA,sha256=saRDX2uZwiYyNQMXq75WnYbQ8oG2KBkk9gh8yuyqvDg,10108
16
+ local_openai2anthropic-0.2.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
+ local_openai2anthropic-0.2.5.dist-info/entry_points.txt,sha256=hdc9tSJUNxyNLXcTYye5SuD2K0bEQhxBhGnWTFup6ZM,116
18
+ local_openai2anthropic-0.2.5.dist-info/licenses/LICENSE,sha256=X3_kZy3lJvd_xp8IeyUcIAO2Y367MXZc6aaRx8BYR_s,11369
19
+ local_openai2anthropic-0.2.5.dist-info/RECORD,,