diff --git a/GEMINI.md b/GEMINI.md index 83a98f1..50aae41 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -84,7 +84,6 @@ cat "$TRACE_DIR/$(ls -t "$TRACE_DIR" | head -1)/summary.md" | ---------- | --------------------------------- | ------------------------------------ | | `POST` | `/v1/responses` | Responses API (sync + streaming) | | `POST` | `/v1/chat/completions` | Chat Completions API (OpenAI compat) | -| `POST` | `/v1/gemini` | Native Gemini API | | `POST` | `/v1beta/models/{model}:{action}` | Official Gemini v1beta routes | | `GET/POST` | `/v1/search` | Web Search via Google grounding | | `GET` | `/v1/models` | List available models | diff --git a/README.md b/README.md index 8e7d771..d916910 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ zg start | ---------- | --------------------------------- | ------------------------------------ | | `POST` | `/v1/responses` | Responses API (sync + streaming) | | `POST` | `/v1/chat/completions` | Chat Completions API (OpenAI compat) | -| `POST` | `/v1/gemini` | Native Gemini API | | `POST` | `/v1beta/models/{model}:{action}` | Official Gemini v1beta routes | | `GET/POST` | `/v1/search` | Web Search via Google grounding | | `GET` | `/v1/models` | List available models | diff --git a/docs/architecture.md b/docs/architecture.md index 274ebff..7daf6e2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -133,7 +133,6 @@ graph TD | ---------- | ---------------------- | --------------------------------- | --------------------------------------- | | `POST` | `/v1/responses` | `responses::handle_responses` | OpenAI Responses API (streaming + sync) | | `POST` | `/v1/chat/completions` | `completions::handle_completions` | OpenAI Chat Completions API | -| `POST` | `/v1/gemini` | `gemini::handle_gemini` | Custom Gemini endpoint | | `POST` | `/v1beta/{*path}` | `gemini::handle_gemini_v1beta` | Official Gemini v1beta routes | | `GET/POST` | `/v1/search` | `search::handle_search_*` | Web search via Google grounding | | `GET` | `/v1/models` | `handle_models` | List available models | diff --git a/src/api/gemini.rs b/src/api/gemini.rs index 6687781..8619451 100644 --- a/src/api/gemini.rs +++ b/src/api/gemini.rs @@ -1,7 +1,6 @@ //! Gemini-native endpoint — zero-translation tool call passthrough. //! //! Routes: -//! POST /v1/gemini (custom, stream via body flag) //! POST /v1beta/models/{model}:generateContent (sync, official Gemini API path) //! POST /v1beta/models/{model}:streamGenerateContent (stream, official Gemini API path) //! @@ -118,13 +117,7 @@ async fn build_usage_metadata( } } -/// POST /v1/gemini — simple custom endpoint -pub(crate) async fn handle_gemini( - State(state): State>, - Json(body): Json, -) -> axum::response::Response { - handle_gemini_inner(state, body).await -} + /// POST /v1beta/*path — handles both :generateContent and :streamGenerateContent /// @@ -173,7 +166,7 @@ async fn handle_gemini_inner( body: GeminiRequest, ) -> axum::response::Response { info!( - "POST /v1/gemini model={} stream={}", + "POST /v1beta/gemini model={} stream={}", body.model.as_deref().unwrap_or(DEFAULT_MODEL), body.stream ); diff --git a/src/api/mod.rs b/src/api/mod.rs index 008b5c7..39eeddb 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -48,7 +48,6 @@ pub fn router(state: Arc) -> Router { "/v1/chat/completions", post(completions::handle_completions), ) - .route("/v1/gemini", post(gemini::handle_gemini)) .route( "/v1beta/{*path}", post(gemini::handle_gemini_v1beta), @@ -72,7 +71,7 @@ pub fn router(state: Arc) -> Router { async fn handle_root() -> Json { Json(serde_json::json!({ - "service": "antigravity-openai-proxy", + "service": "zerogravity", "version": "3.3.0", "runtime": "rust", "endpoints": [