Skip to content

Python, Phi-4 returns 500 error #13368

Open
@geosword

Description

@geosword

Describe the bug
A clear and concise description of what the bug is.
Phi-4 does not work - returns a 500 error

To Reproduce
Steps to reproduce the behavior:

  1. Create a new app
  2. Custom engine app
  3. Basic AI Chatbot
  4. Python
  5. Azure OpenAI
  6. Enter AOAI key (from Deployment in AI Foundry)
  7. Enter the endpoint (from Deployment in AI Foundry)
  8. run local env (after checking .env.local.user has the appropriate values)
  9. The bot returns "an error occurred getting the response" (or something to that effect) in the teams chat. and checking the terminal output shows:
    """
    File "/Users/dylanh/development/devclub/devclub67/aoaibot/.venv/lib/python3.12/site-packages/teams/ai/planners/action_planner.py", line 100, in begin_task
    return await self.continue_task(context, state)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/dylanh/development/devclub/devclub67/aoaibot/.venv/lib/python3.12/site-packages/teams/ai/planners/action_planner.py", line 111, in continue_task
    raise ApplicationError(res.error or "[ActionPlanner]: failed task")
    teams.app_error.ApplicationError:
    The chat completion API returned an error
    status of InternalServerError: Error code: 500 - {'error': {'code': 'InternalServerError', 'message': 'Backend returned unexpected response. Please contact Microsoft for help.'}}
    """
    Expected behavior
    I expected the model to return a response

VS Code Extension Information (please complete the following information):

  • OS: Mac OS
  • Version 14.6.1 (23G93)

Version: 1.97.2
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z (3 wks ago)
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

*as-designedWhat is the designed behaviorTA:AuthTeam Area: Auth

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions