Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Add Foundry-Local as agent #410

Description

Summary of the new feature / enhancement

I would like to use Foundry Local to run LLMs directly on my computer. Please consider adding support for it, as this would allow me to reuse existing models without needing to download another local model provider and duplicate model weights.

Proposed technical implementation details (optional)

No response

Activity

  1. daxian-dbw commented on Aug 28, 2025

    @daxian-dbw
    Member

    With #413 being merged, you should be able to use the openai-gpt agent against a Foundry Local service endpoint.

    Use Foundry Local with openai-gpt agent

    1. Update the openai.agent.json file with the following GPT configuration:

      {
        "GPTs": [
          {
            "Name": "foundry-local",
            "Description": "A GPT instance using Foundry Local.",
            "Endpoint": "http://127.0.0.1:56952/v1",
            "ModelName": "Phi-3.5-mini-instruct-generic-cpu",
            "Key": "OPENAI_API_KEY"
          }
        ]
      
        "Active": "foundry-local"
      }
    2. In PowerShell, run the following commands to start up the Foundry service and load the model (use phi-3.5-mini as an example)

      PS> foundry service start
      🟢 Service is already running on http://127.0.0.1:56952/.
      
      PS> foundry model load phi-3.5-mini
      🕔 Loading model...
      🟢 Model phi-3.5-mini loaded successfully
      
      PS> foundry service ps
      Models running in service:
           Alias                          Model ID
      🟢  phi-3.5-mini                   Phi-3.5-mini-instruct-generic-cpu
      

    Be noted that:

    1. The endpoint to use is the URL shown from foundry service start plus /v1.
    2. The model name to use is shown as the 'Model ID' from the foundry service ps command.
      • Make sure you use the exact casing as shown in 'Model ID'. Foundry Local is case-sensitive.
    3. The API key is hardcoded to be literally "OPENAI_API_KEY".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions