Fortinet white logo
Fortinet white logo

CLI Reference

config llm profile

config llm profile

This command is available for model(s): FortiGate 1000D, FortiGate 1000F, FortiGate 1001F, FortiGate 100F, FortiGate 101F Gen2, FortiGate 1100E, FortiGate 1101E, FortiGate 120G, FortiGate 121G, FortiGate 1800F, FortiGate 1801F, FortiGate 2000E, FortiGate 200E, FortiGate 200F, FortiGate 200G, FortiGate 201E, FortiGate 201F, FortiGate 201G, FortiGate 2200E, FortiGate 2201E, FortiGate 2500E, FortiGate 2600F, FortiGate 2601F, FortiGate 3000F, FortiGate 3001F, FortiGate 300E, FortiGate 301E, FortiGate 30G, FortiGate 31G, FortiGate 3200F, FortiGate 3201F Gen2, FortiGate 3300E, FortiGate 3301E, FortiGate 3400E, FortiGate 3401E, FortiGate 3500F Gen2, FortiGate 3501F Gen2, FortiGate 3600E, FortiGate 3601E, FortiGate 3700F, FortiGate 3701F, FortiGate 3960E, FortiGate 3980E, FortiGate 400E Bypass, FortiGate 400E, FortiGate 400F, FortiGate 401E, FortiGate 401F, FortiGate 40F 3G4G, FortiGate 40F, FortiGate 4200F, FortiGate 4201F Gen2, FortiGate 4400F, FortiGate 4401F Gen2, FortiGate 4800F, FortiGate 4801F, FortiGate 500E, FortiGate 501E, FortiGate 50G 5G, FortiGate 50G DSL, FortiGate 50G SFP-POE, FortiGate 50G SFP, FortiGate 50G, FortiGate 51G 5G, FortiGate 51G SFP-POE, FortiGate 51G, FortiGate 600E, FortiGate 600F, FortiGate 601E, FortiGate 601F, FortiGate 60F, FortiGate 61F, FortiGate 70F, FortiGate 70G-POE, FortiGate 70G, FortiGate 71F, FortiGate 71G-POE, FortiGate 71G, FortiGate 800D, FortiGate 80F Bypass, FortiGate 80F DSL, FortiGate 80F Gen2, FortiGate 80F-POE, FortiGate 81F Gen2, FortiGate 81F-POE, FortiGate 900D, FortiGate 900G, FortiGate 901G, FortiGate 90G Gen2, FortiGate 90G, FortiGate 91G Gen2, FortiGate 91G, FortiGateRugged 50G 5G, FortiGateRugged 60F 3G4G, FortiGateRugged 60F Gen2, FortiGateRugged 70F 3G4G, FortiGateRugged 70F, FortiGateRugged 70G 5G Dual, FortiGateRugged 70G, FortiWiFi 30G, FortiWiFi 31G, FortiWiFi 40F 3G4G, FortiWiFi 40F, FortiWiFi 50G 5G, FortiWiFi 50G DSL, FortiWiFi 50G SFP, FortiWiFi 50G, FortiWiFi 51G, FortiWiFi 60F, FortiWiFi 61F, FortiWiFi 70G-POE, FortiWiFi 70G, FortiWiFi 71G, FortiWiFi 80F 2R 3G4G DSL, FortiWiFi 80F 2R, FortiWiFi 81F 2R 3G4G DSL, FortiWiFi 81F 2R 3G4G-POE, FortiWiFi 81F 2R-POE, FortiWiFi 81F 2R.

It is not available for: FortiGate-VM64 Aliyun, FortiGate-VM64 AWS, FortiGate-VM64 Azure, FortiGate-VM64 GCP, FortiGate-VM64 OPC, FortiGate-VM64.

Configure LLM Proxy profiles.

config llm profile
    Description: Configure LLM Proxy profiles.
    edit <name>
        config chat
            Description: LLM Proxy chat completions API (/v1/chat/completions).
            set max-completion-tokens {integer}
            set max-req-len {integer}
            set status [enable|disable]
            set stream [bypass|block]
            set system-prompt {var-string}
            set system-prompt-mode [bypass|replace|...]
        end
        config image-gen
            Description: LLM Proxy image generation API (/v1/images/generations).
            set status [enable|disable]
        end
        config list-models
            Description: LLM Proxy list models API (/v1/models).
            set status [enable|disable]
        end
        set log [none|blocked|...]
        set unknown-api [enable|disable]
    next
end

config llm profile

Parameter

Description

Type

Size

Default

log

Log option.

option

-

blocked

Option

Description

none

No log.

blocked

Log blocked requests.

all

Log all requests.

name

LLM Proxy profile name.

string

Maximum length: 35

unknown-api

Support unknown API.

option

-

disable

Option

Description

enable

Enable unknown API.

disable

Disable unknown API.

config chat

Parameter

Description

Type

Size

Default

max-completion-tokens

Maximum number of completion tokens (0 - 10000000, default = 0, means no limit).

integer

Minimum value: 0 Maximum value: 10000000

0

max-req-len

Max size of chat completions request body, (0 - 65535 KiB, default = 1024, 0 means no limit).

integer

Minimum value: 0 Maximum value: 65535

1024

status

Support chat completions API.

option

-

enable

Option

Description

enable

Enable chat completions API.

disable

Disable chat completions API.

stream

support chat completions stream mode.

option

-

bypass

Option

Description

bypass

Enable chat completions stream mode.

block

Block chat completions stream mode.

system-prompt

Replace/Append chat completions system prompt.

var-string

Maximum length: 255

system-prompt-mode

System prompt processing mode.

option

-

bypass

Option

Description

bypass

Don't change the system prompt.

replace

Replace the system prompt with config.

prepend

Prepend the config to the system prompt.

append

Append the config to the system prompt.

config image-gen

Parameter

Description

Type

Size

Default

status

Support image generation API.

option

-

enable

Option

Description

enable

Enable image generation API.

disable

Disable image generation API.

config list-models

Parameter

Description

Type

Size

Default

status

Support list models API.

option

-

enable

Option

Description

enable

Enable list models API.

disable

Disable list models API.

config llm profile

config llm profile

This command is available for model(s): FortiGate 1000D, FortiGate 1000F, FortiGate 1001F, FortiGate 100F, FortiGate 101F Gen2, FortiGate 1100E, FortiGate 1101E, FortiGate 120G, FortiGate 121G, FortiGate 1800F, FortiGate 1801F, FortiGate 2000E, FortiGate 200E, FortiGate 200F, FortiGate 200G, FortiGate 201E, FortiGate 201F, FortiGate 201G, FortiGate 2200E, FortiGate 2201E, FortiGate 2500E, FortiGate 2600F, FortiGate 2601F, FortiGate 3000F, FortiGate 3001F, FortiGate 300E, FortiGate 301E, FortiGate 30G, FortiGate 31G, FortiGate 3200F, FortiGate 3201F Gen2, FortiGate 3300E, FortiGate 3301E, FortiGate 3400E, FortiGate 3401E, FortiGate 3500F Gen2, FortiGate 3501F Gen2, FortiGate 3600E, FortiGate 3601E, FortiGate 3700F, FortiGate 3701F, FortiGate 3960E, FortiGate 3980E, FortiGate 400E Bypass, FortiGate 400E, FortiGate 400F, FortiGate 401E, FortiGate 401F, FortiGate 40F 3G4G, FortiGate 40F, FortiGate 4200F, FortiGate 4201F Gen2, FortiGate 4400F, FortiGate 4401F Gen2, FortiGate 4800F, FortiGate 4801F, FortiGate 500E, FortiGate 501E, FortiGate 50G 5G, FortiGate 50G DSL, FortiGate 50G SFP-POE, FortiGate 50G SFP, FortiGate 50G, FortiGate 51G 5G, FortiGate 51G SFP-POE, FortiGate 51G, FortiGate 600E, FortiGate 600F, FortiGate 601E, FortiGate 601F, FortiGate 60F, FortiGate 61F, FortiGate 70F, FortiGate 70G-POE, FortiGate 70G, FortiGate 71F, FortiGate 71G-POE, FortiGate 71G, FortiGate 800D, FortiGate 80F Bypass, FortiGate 80F DSL, FortiGate 80F Gen2, FortiGate 80F-POE, FortiGate 81F Gen2, FortiGate 81F-POE, FortiGate 900D, FortiGate 900G, FortiGate 901G, FortiGate 90G Gen2, FortiGate 90G, FortiGate 91G Gen2, FortiGate 91G, FortiGateRugged 50G 5G, FortiGateRugged 60F 3G4G, FortiGateRugged 60F Gen2, FortiGateRugged 70F 3G4G, FortiGateRugged 70F, FortiGateRugged 70G 5G Dual, FortiGateRugged 70G, FortiWiFi 30G, FortiWiFi 31G, FortiWiFi 40F 3G4G, FortiWiFi 40F, FortiWiFi 50G 5G, FortiWiFi 50G DSL, FortiWiFi 50G SFP, FortiWiFi 50G, FortiWiFi 51G, FortiWiFi 60F, FortiWiFi 61F, FortiWiFi 70G-POE, FortiWiFi 70G, FortiWiFi 71G, FortiWiFi 80F 2R 3G4G DSL, FortiWiFi 80F 2R, FortiWiFi 81F 2R 3G4G DSL, FortiWiFi 81F 2R 3G4G-POE, FortiWiFi 81F 2R-POE, FortiWiFi 81F 2R.

It is not available for: FortiGate-VM64 Aliyun, FortiGate-VM64 AWS, FortiGate-VM64 Azure, FortiGate-VM64 GCP, FortiGate-VM64 OPC, FortiGate-VM64.

Configure LLM Proxy profiles.

config llm profile
    Description: Configure LLM Proxy profiles.
    edit <name>
        config chat
            Description: LLM Proxy chat completions API (/v1/chat/completions).
            set max-completion-tokens {integer}
            set max-req-len {integer}
            set status [enable|disable]
            set stream [bypass|block]
            set system-prompt {var-string}
            set system-prompt-mode [bypass|replace|...]
        end
        config image-gen
            Description: LLM Proxy image generation API (/v1/images/generations).
            set status [enable|disable]
        end
        config list-models
            Description: LLM Proxy list models API (/v1/models).
            set status [enable|disable]
        end
        set log [none|blocked|...]
        set unknown-api [enable|disable]
    next
end

config llm profile

Parameter

Description

Type

Size

Default

log

Log option.

option

-

blocked

Option

Description

none

No log.

blocked

Log blocked requests.

all

Log all requests.

name

LLM Proxy profile name.

string

Maximum length: 35

unknown-api

Support unknown API.

option

-

disable

Option

Description

enable

Enable unknown API.

disable

Disable unknown API.

config chat

Parameter

Description

Type

Size

Default

max-completion-tokens

Maximum number of completion tokens (0 - 10000000, default = 0, means no limit).

integer

Minimum value: 0 Maximum value: 10000000

0

max-req-len

Max size of chat completions request body, (0 - 65535 KiB, default = 1024, 0 means no limit).

integer

Minimum value: 0 Maximum value: 65535

1024

status

Support chat completions API.

option

-

enable

Option

Description

enable

Enable chat completions API.

disable

Disable chat completions API.

stream

support chat completions stream mode.

option

-

bypass

Option

Description

bypass

Enable chat completions stream mode.

block

Block chat completions stream mode.

system-prompt

Replace/Append chat completions system prompt.

var-string

Maximum length: 255

system-prompt-mode

System prompt processing mode.

option

-

bypass

Option

Description

bypass

Don't change the system prompt.

replace

Replace the system prompt with config.

prepend

Prepend the config to the system prompt.

append

Append the config to the system prompt.

config image-gen

Parameter

Description

Type

Size

Default

status

Support image generation API.

option

-

enable

Option

Description

enable

Enable image generation API.

disable

Disable image generation API.

config list-models

Parameter

Description

Type

Size

Default

status

Support list models API.

option

-

enable

Option

Description

enable

Enable list models API.

disable

Disable list models API.