Skip to content

Commit 48780c9

Browse files
committed
finally make token counting work in apps
1 parent f05dc62 commit 48780c9

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

chatmock/routes_openai.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def chat_completions() -> Response:
8787
tool_choice=tool_choice,
8888
parallel_tool_calls=parallel_tool_calls,
8989
reasoning_param=reasoning_param,
90-
include_usage=(not is_stream) or include_usage,
9190
)
9291
if error_resp is not None:
9392
return error_resp
@@ -256,7 +255,6 @@ def completions() -> Response:
256255
input_items,
257256
instructions=BASE_INSTRUCTIONS,
258257
reasoning_param=reasoning_param,
259-
include_usage=(not stream_req) or include_usage,
260258
)
261259
if error_resp is not None:
262260
return error_resp

chatmock/upstream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def start_upstream_request(
4040
tool_choice: Any | None = None,
4141
parallel_tool_calls: bool = False,
4242
reasoning_param: Dict[str, Any] | None = None,
43-
include_usage: bool | None = None,
4443
):
4544
access_token, account_id = get_effective_chatgpt_auth()
4645
if not access_token or not account_id:

0 commit comments

Comments
 (0)