SkyeYoung commented on issue #12532:
URL: https://github.com/apache/apisix/issues/12532#issuecomment-3204196497

   @hw872715125 I couldn't reproduce the situation you described. Please take a 
look at the test process and configuration below to see if there are any 
issues, or provide a more accurate process so that I can assist in resolving 
the problem.
   
   I have tested in both 3.12.0 and 3.13.0, and the configuration is as follows:
   
   ```yaml
   #apisix.yaml
   routes:
     - id: ai-chat-test
       uri: /v1/chat/completions/t
       methods:
         - POST
       plugins:
         ai-proxy:
           provider: openai-compatible
           auth:
             header:
               Authorization: "Bearer token"
           override:
             endpoint: "https://openrouter.ai/api/v1/chat/completions";
           timeout: 180000
           logging:
             summaries: true
             payloads: true
         ai-prompt-decorator:
           prepend:
             - role: system
               content: task
         file-logger:
           path: "/usr/local/apisix/logs/file.log"
           include_req_body: true
           include_resp_body: true
   #END
   ```
   
   ```yaml
   #config.yaml
   apisix:
     node_listen: 9080
     enable_admin: true
     enable_admin_cors: true
   
   deployment:
     role: data_plane
     role_data_plane:
       config_provider: yaml
     admin:
       allow_admin:
         - 0.0.0.0/0
       admin_key:
         - name: "admin"
           key: edd1c9f034335f136f87ad84b625c8f1
           role: admin
       admin_listen:
         ip: 0.0.0.0
         port: 9180
   
   plugins:
     - ai-proxy
     - ai-prompt-decorator
     - file-logger
   ```
   
   ```yaml
   # docker-compose.yaml
   services:
     apisix:
       image: apache/apisix:3.12.0-debian
       container_name: apisix
       restart: always
       volumes:
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
         - ./apisix_conf/apisix.yaml:/usr/local/apisix/conf/apisix.yaml:ro
         # logs
         - ./logs/error.log:/usr/local/apisix/logs/error.log
         - ./logs/access.log:/usr/local/apisix/logs/access.log
         - ./logs/file.log:/usr/local/apisix/logs/file.log
       ports:
         - "9080:9080"
         - "9180:9180"
   ```
   
   Made two requests:
   
   ```shell
   $ curl -X POST "http://localhost:9080/v1/chat/completions/t";   -H 
"Content-Type: application/json"   -d '{
       "model": "openai/gpt-oss-20b:free",
       "messages": [
         {
           "role": "user",
           "content": "test111"
         }
       ]
     }'
   
   
   $ curl -X POST "http://localhost:9080/v1/chat/completions/t";   -H 
"Content-Type: application/json"   -d '{
       "model": "openai/gpt-oss-20b:free",
       "messages": [
         {
           "role": "user",
           "content": "test222"
         }
       ]
     }'
   ```
   
   However, the situation described in your first picture was not found in 
file.log:
   
   <img width="2530" height="1278" alt="Image" 
src="https://github.com/user-attachments/assets/b7a33d7e-61f5-4bb0-a45e-14c9c6115454";
 />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to