Method
fetch
(
&self,
_request: CustomFetchRequest,
)
Source from the content-addressed store, hash-verified
| 2414 | #[async_trait] |
| 2415 | impl CustomFetchProxy for FakeCustomFetchProxy { |
| 2416 | async fn fetch( |
| 2417 | &self, |
| 2418 | _request: CustomFetchRequest, |
| 2419 | ) -> Result<CustomFetchResponse, ProviderError> { |
| 2420 | Ok(CustomFetchResponse { |
| 2421 | status: 200, |
| 2422 | headers: HashMap::new(), |
| 2423 | body: json!({ |
| 2424 | "id": "resp_1", |
| 2425 | "model": "gpt-5", |
| 2426 | "output": [ |
| 2427 | { |
| 2428 | "type": "message", |
| 2429 | "content": [ |
| 2430 | {"type": "output_text", "text": "hello from proxy"} |
| 2431 | ] |
| 2432 | } |
| 2433 | ], |
| 2434 | "usage": { |
| 2435 | "input_tokens": 1, |
| 2436 | "output_tokens": 1, |
| 2437 | "total_tokens": 2 |
| 2438 | } |
| 2439 | }) |
| 2440 | .to_string(), |
| 2441 | }) |
| 2442 | } |
| 2443 | |
| 2444 | async fn fetch_stream( |
| 2445 | &self, |
Tested by
no test coverage detected