mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #13682 from BerriAI/litellm_stable_release_fixes
Litellm stable release fixes
This commit is contained in:
commit
50dec7cdee
3 changed files with 23 additions and 14 deletions
|
|
@ -1747,6 +1747,11 @@ class CustomStreamWrapper:
|
|||
if is_empty:
|
||||
continue
|
||||
print_verbose(f"final returned processed chunk: {processed_chunk}")
|
||||
|
||||
# add usage as hidden param
|
||||
if self.sent_last_chunk is True and self.stream_options is None:
|
||||
usage = calculate_total_usage(chunks=self.chunks)
|
||||
processed_chunk._hidden_params["usage"] = usage
|
||||
return processed_chunk
|
||||
raise StopAsyncIteration
|
||||
else: # temporary patch for non-aiohttp async calls
|
||||
|
|
@ -1790,6 +1795,7 @@ class CustomStreamWrapper:
|
|||
messages=self.messages,
|
||||
logging_obj=self.logging_obj,
|
||||
)
|
||||
|
||||
response = self.model_response_creator()
|
||||
if complete_streaming_response is not None:
|
||||
setattr(
|
||||
|
|
|
|||
|
|
@ -1599,7 +1599,7 @@ def test_logging_key_masking_gemini():
|
|||
assert "PART" == trimmed_key
|
||||
|
||||
|
||||
@pytest.mark.parametrize("sync_mode", [True])
|
||||
@pytest.mark.parametrize("sync_mode", [True, False])
|
||||
@pytest.mark.asyncio
|
||||
async def test_standard_logging_payload_stream_usage(sync_mode):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import { EndpointType, getEndpointType } from "./chat_ui/mode_endpoint_mapping";
|
|||
import { MessageType } from "./chat_ui/types";
|
||||
import { getProviderLogoAndName } from "./provider_info_helpers";
|
||||
import Navbar from "./navbar";
|
||||
import { ThemeProvider } from "@/contexts/ThemeContext";
|
||||
// Simple approach without react-markdown dependency
|
||||
|
||||
interface ModelGroupInfo {
|
||||
|
|
@ -476,18 +477,19 @@ const PublicModelHub: React.FC<PublicModelHubProps> = ({ accessToken }) => {
|
|||
];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-white">
|
||||
{/* Navigation */}
|
||||
<Navbar
|
||||
userID={null}
|
||||
userEmail={null}
|
||||
userRole={null}
|
||||
premiumUser={false}
|
||||
setProxySettings={setProxySettings}
|
||||
proxySettings={proxySettings}
|
||||
accessToken={accessToken || null}
|
||||
isPublicPage={true}
|
||||
/>
|
||||
<ThemeProvider accessToken={accessToken}>
|
||||
<div className="min-h-screen bg-white">
|
||||
{/* Navigation */}
|
||||
<Navbar
|
||||
userID={null}
|
||||
userEmail={null}
|
||||
userRole={null}
|
||||
premiumUser={false}
|
||||
setProxySettings={setProxySettings}
|
||||
proxySettings={proxySettings}
|
||||
accessToken={accessToken || null}
|
||||
isPublicPage={true}
|
||||
/>
|
||||
|
||||
<div className="w-full px-8 py-12">
|
||||
{/* About Section */}
|
||||
|
|
@ -856,7 +858,8 @@ const PublicModelHub: React.FC<PublicModelHubProps> = ({ accessToken }) => {
|
|||
</div>
|
||||
)}
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue