meshagent-llm-proxy 0.38.0__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.
@@ -0,0 +1,103 @@
1
+ from meshagent.llm_proxy.pricing import (
2
+ ChargeSpec,
3
+ LLM_PROXY_SURCHARGE_RATE,
4
+ UsagePricingLineItem,
5
+ build_charge_specs,
6
+ build_usage_pricing_line_items,
7
+ is_pricing_available,
8
+ per_million,
9
+ per_thousand,
10
+ preprocess,
11
+ pricing,
12
+ supports_llm_proxy_surcharge,
13
+ )
14
+ from meshagent.llm_proxy.providers import (
15
+ ANTHROPIC_ALLOWED_EXACT_PATHS,
16
+ ANTHROPIC_ALLOWED_PREFIXES,
17
+ OPENAI_ALLOWED_EXACT_PATHS,
18
+ OPENAI_ALLOWED_PREFIXES,
19
+ OPENAI_ALLOWED_WEBSOCKET_PATHS,
20
+ is_anthropic_path_allowed,
21
+ is_openai_path_allowed,
22
+ is_openai_websocket_path_allowed,
23
+ )
24
+ from meshagent.llm_proxy.proxy import (
25
+ ProxyWebSocketClientError,
26
+ ProxyWebSocketOutcome,
27
+ filter_proxied_response_headers,
28
+ http_to_websocket_url,
29
+ proxy_websocket_request,
30
+ )
31
+ from meshagent.llm_proxy.sse import SSEEvent
32
+ from meshagent.llm_proxy.local_proxy import (
33
+ DEFAULT_PROXY_HOST,
34
+ DEFAULT_PROXY_PORT,
35
+ LocalLLMProxyServer,
36
+ MESHAGENT_PROJECT_ID_HEADER,
37
+ build_local_proxy_env,
38
+ )
39
+ from meshagent.llm_proxy.usage import (
40
+ ModelUsage,
41
+ RequestActivityEvent,
42
+ UsageCollector,
43
+ UsageEvent,
44
+ UsageSnapshot,
45
+ UsageSummary,
46
+ extract_anthropic_completion_usage,
47
+ extract_openai_audio_speech_usage,
48
+ extract_openai_completion_usage,
49
+ extract_openai_image_usage,
50
+ extract_openai_realtime_usage,
51
+ extract_openai_transcription_model_from_session,
52
+ merge_cumulative_usage,
53
+ resolve_openai_image_pricing_key,
54
+ resolve_usage_model,
55
+ )
56
+
57
+ __all__ = [
58
+ "ANTHROPIC_ALLOWED_EXACT_PATHS",
59
+ "ANTHROPIC_ALLOWED_PREFIXES",
60
+ "ChargeSpec",
61
+ "DEFAULT_PROXY_HOST",
62
+ "DEFAULT_PROXY_PORT",
63
+ "LLM_PROXY_SURCHARGE_RATE",
64
+ "LocalLLMProxyServer",
65
+ "MESHAGENT_PROJECT_ID_HEADER",
66
+ "ModelUsage",
67
+ "OPENAI_ALLOWED_EXACT_PATHS",
68
+ "OPENAI_ALLOWED_PREFIXES",
69
+ "OPENAI_ALLOWED_WEBSOCKET_PATHS",
70
+ "ProxyWebSocketClientError",
71
+ "ProxyWebSocketOutcome",
72
+ "RequestActivityEvent",
73
+ "SSEEvent",
74
+ "UsageCollector",
75
+ "UsageEvent",
76
+ "UsagePricingLineItem",
77
+ "UsageSnapshot",
78
+ "UsageSummary",
79
+ "build_charge_specs",
80
+ "build_local_proxy_env",
81
+ "build_usage_pricing_line_items",
82
+ "extract_anthropic_completion_usage",
83
+ "extract_openai_audio_speech_usage",
84
+ "extract_openai_completion_usage",
85
+ "extract_openai_image_usage",
86
+ "extract_openai_realtime_usage",
87
+ "extract_openai_transcription_model_from_session",
88
+ "filter_proxied_response_headers",
89
+ "http_to_websocket_url",
90
+ "is_anthropic_path_allowed",
91
+ "is_openai_path_allowed",
92
+ "is_openai_websocket_path_allowed",
93
+ "merge_cumulative_usage",
94
+ "is_pricing_available",
95
+ "per_million",
96
+ "per_thousand",
97
+ "preprocess",
98
+ "pricing",
99
+ "proxy_websocket_request",
100
+ "resolve_openai_image_pricing_key",
101
+ "resolve_usage_model",
102
+ "supports_llm_proxy_surcharge",
103
+ ]