[model-gateway] change rust package name to sgl-model-gateway instead (#14283)

This commit is contained in:
Simo Lin
2025-12-02 00:06:54 -08:00
committed by GitHub
parent 64092c8b55
commit 51a86ce69e
56 changed files with 167 additions and 160 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
use serde_json::json;
use sglang_router_rs::protocols::{
use sgl_model_gateway::protocols::{
chat::{ChatCompletionRequest, ChatMessage, MessageContent},
common::{
Function, FunctionCall, FunctionChoice, StreamOptions, Tool, ToolChoice, ToolChoiceValue,
+1 -1
View File
@@ -1,5 +1,5 @@
use serde_json::json;
use sglang_router_rs::protocols::chat::{ChatMessage, MessageContent};
use sgl_model_gateway::protocols::chat::{ChatMessage, MessageContent};
#[test]
fn test_chat_message_tagged_by_role_system() {
+1 -1
View File
@@ -1,5 +1,5 @@
use serde_json::{from_str, json, to_string};
use sglang_router_rs::protocols::{common::GenerationRequest, embedding::EmbeddingRequest};
use sgl_model_gateway::protocols::{common::GenerationRequest, embedding::EmbeddingRequest};
#[test]
fn test_embedding_request_serialization_string_input() {
+1 -1
View File
@@ -1,7 +1,7 @@
use std::collections::HashMap;
use serde_json::{from_str, to_string, Number, Value};
use sglang_router_rs::protocols::{
use sgl_model_gateway::protocols::{
common::{GenerationRequest, StringOrArray, UsageInfo},
rerank::{RerankRequest, RerankResponse, RerankResult, V1RerankReqInput},
};
+9 -9
View File
@@ -1,5 +1,5 @@
use serde_json::json;
use sglang_router_rs::protocols::{
use sgl_model_gateway::protocols::{
common::{Function, StringOrArray, ToolChoice, ToolChoiceValue},
responses::{
IncludeField, ResponseInput, ResponseInputOutputItem, ResponseTool, ResponseToolType,
@@ -963,7 +963,7 @@ fn test_validate_input_items_structure() {
/// Test tool_choice defaults to auto when tools are present
#[test]
fn test_normalize_tool_choice_auto() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1004,7 +1004,7 @@ fn test_normalize_tool_choice_auto() {
/// Test tool_choice defaults to none when tools array is empty
#[test]
fn test_normalize_tool_choice_none() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1031,7 +1031,7 @@ fn test_normalize_tool_choice_none() {
/// Test tool_choice is not overridden if already set
#[test]
fn test_normalize_tool_choice_no_override() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1068,7 +1068,7 @@ fn test_normalize_tool_choice_no_override() {
/// Test parallel_tool_calls defaults to true when tools are present
#[test]
fn test_normalize_parallel_tool_calls() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1107,7 +1107,7 @@ fn test_normalize_parallel_tool_calls() {
/// Test parallel_tool_calls is not set when tools are absent
#[test]
fn test_normalize_parallel_tool_calls_no_tools() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1127,7 +1127,7 @@ fn test_normalize_parallel_tool_calls_no_tools() {
/// Test parallel_tool_calls is not overridden if already set
#[test]
fn test_normalize_parallel_tool_calls_no_override() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1162,7 +1162,7 @@ fn test_normalize_parallel_tool_calls_no_override() {
/// Test store defaults to true
#[test]
fn test_normalize_store_default() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),
@@ -1182,7 +1182,7 @@ fn test_normalize_store_default() {
/// Test store is not overridden if already set
#[test]
fn test_normalize_store_no_override() {
use sglang_router_rs::protocols::validated::Normalizable;
use sgl_model_gateway::protocols::validated::Normalizable;
let mut request = ResponsesRequest {
input: ResponseInput::Text("test".to_string()),