Skip to content

web: update model capabilites#6814

Merged
dinhlongviolin1 merged 2 commits into
devfrom
feat/web-models-capabilites
Oct 23, 2025
Merged

web: update model capabilites#6814
dinhlongviolin1 merged 2 commits into
devfrom
feat/web-models-capabilites

Conversation

@dinhlongviolin1

Copy link
Copy Markdown
Contributor

Describe Your Changes

  • Migrate auth
  • Update routes (remove conv prefix)
  • Fetch model capabilities and use it properly

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copilot AI review requested due to automatic review settings October 23, 2025 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the web application's authentication and model handling to improve token expiry management and fetch model capabilities dynamically from the server rather than using hardcoded values.

Key changes:

  • Enhanced authentication service to support both expires_in and expires_at token expiry formats
  • Removed /conv prefix from API endpoints
  • Implemented dynamic fetching of model capabilities from the server with caching and validation
  • Updated dialog API usage to use serviceHub pattern

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web-app/src/containers/ChatInput.tsx Updated dialog API call to use serviceHub pattern
extensions-web/src/shared/auth/types.ts Added optional expires_at field to support timestamp-based token expiry
extensions-web/src/shared/auth/service.ts Added computeTokenExpiry method to handle both expiry formats and removed auto guest login on logout
extensions-web/src/jan-provider-web/store.ts Extended JanModel type with capabilities and supportedParameters fields
extensions-web/src/jan-provider-web/provider.ts Refactored model validation to sync with server capabilities instead of hardcoded values
extensions-web/src/jan-provider-web/api.ts Added model catalog fetching, caching, and capability derivation logic; updated endpoints to remove /conv prefix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread extensions-web/src/jan-provider-web/api.ts
Comment thread extensions-web/src/jan-provider-web/provider.ts
Comment thread extensions-web/src/jan-provider-web/api.ts

@locnguyen1986 locnguyen1986 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread extensions-web/src/jan-provider-web/api.ts Outdated
@github-actions

github-actions Bot commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

Barecheck - Code coverage report

Total: 29.67%

Your code coverage diff: -0.07% ▾

Uncovered files and lines
FileLines
extensions-web/src/jan-provider-web/api.ts6-9, 14, 21-23, 25-28, 30-31, 33-38, 40-41, 129, 132-133, 135-137, 139-144, 146-148, 150-154, 156-158, 160-161, 163-166, 168, 170-173, 175-184, 186-187, 189-190, 192-195, 197-205, 207-211, 213, 215-228, 230-237, 239-240, 242-249, 251-254, 256-258, 260-261, 263-264, 266-267, 269-271, 273-274, 277, 279-282, 284-287, 289-297, 299-310, 312-314, 316-326, 328-337, 339-344, 346-349, 351-354, 356-359, 361-362, 364-365, 367-369, 371-373, 375
extensions-web/src/jan-provider-web/const.ts1-5, 7
extensions-web/src/jan-provider-web/helpers.ts2, 25-28, 30-33, 39-46, 48-55, 57-60, 62-63, 65-68, 70, 72-77, 79-84, 86-87, 89-91, 93-108, 110-112, 114-115, 117-119, 121-122
extensions-web/src/jan-provider-web/provider.ts6, 16-19, 21-23, 25-26, 28, 30, 32, 34-38, 40-41, 44-46, 48-49, 51-60, 62-63, 66-68, 70-72, 74-95, 97-99, 101-118, 120-121, 124, 126-133, 135, 137-145, 147-149, 151-156, 158-159, 161-174, 176-180, 182-184, 188-191, 194-200, 202-215, 217, 219-220, 222, 225-227, 229-243, 249-257, 259-267, 269-272, 275-278, 280-285, 287, 289-322, 325-329, 331-334, 337-338, 341-344, 346-348, 350-351, 353-357, 359-363, 365-369, 371-375, 377-381, 383-387, 389, 391-394
extensions-web/src/jan-provider-web/store.ts6, 37-43, 45-46, 48-49, 51-52, 54-55, 57-58, 60-61, 63-64, 66-74, 77, 79-81, 84-98
extensions-web/src/shared/auth/service.ts8-9, 15-17, 19, 21, 23-26, 28-29, 31-35, 40-45, 51, 53-56, 58-62, 64-65, 67-69, 72-76, 81-82, 84-87, 89-95, 100-105, 107-110, 112, 114, 117-119, 121-126, 132-133, 135-145, 147, 149-151, 153-154, 156-158, 160-169, 174-175, 177-180, 183-185, 187-197, 199-200, 205-206, 208-209, 211-213, 215, 218, 220, 222-227, 229-231, 236-242, 247-249, 254-258, 260-261, 266-271, 276-277, 279-283, 288-292, 294-295, 297-305, 307-310, 312-317, 322-324, 329-333, 338-341, 343-344, 346-353, 355-357, 359-361, 366-375, 377-379, 384-387, 392-395, 398, 400-402, 404, 406-410, 415-417, 422-424, 429-436, 438-444, 456-461
extensions-web/src/shared/auth/types.ts9-12
web-app/src/containers/ChatInput.tsx130-131, 135-140, 158-162, 166-169, 175, 197-198, 200-202, 219-221, 223-224, 230-252, 266-267, 271-274, 288-289, 294-295, 301-302, 309-312, 317-319, 326-327, 330-358, 361-365, 367-368, 370-374, 376-393, 395-399, 401, 403, 406-413, 416-417, 419-425, 427-437, 439-440, 442-459, 461-479, 482-483, 486-496, 499-508, 511, 513-519, 521, 523-526, 529-530, 532-536, 539-540, 543, 545-548, 550-554, 556-568, 570-577, 579-585, 588-591, 593-599, 601-603, 605, 607-623, 625-640, 642-646, 649-658, 660-663, 666-667, 669-672, 675-676, 679-683, 686-687, 689-692, 695-697, 700-702, 705-708, 710-711, 713-717, 719-721, 725-727, 730-733, 735-736, 738-739, 741-746, 749-755, 757-761, 764, 766-770, 773-780, 782-785, 787-789, 791-802, 804-810, 812-818, 821-824, 826, 862-871, 873-880, 883-888, 890-895, 897, 901-907, 911-919, 921-927, 929-944, 947-950, 952-953, 955, 957-958, 1015, 1061-1064, 1076, 1088-1102, 1109-1113, 1115-1117, 1131-1133, 1138-1142, 1157-1161, 1176-1190, 1193-1207, 1215-1232, 1240, 1254, 1266-1272, 1274-1280, 1285-1302
web-app/src/containers/LeftPanel.tsx107-110, 122, 125-129, 132-143, 189-191, 205-207, 210-212, 215-218, 220-227, 232, 246-248, 250-258, 268, 271-272, 276, 295, 308-314, 316-317, 326-329, 331-347, 349-350, 352, 362-366, 368, 370, 372, 380-381, 409-424, 426-432, 434-438, 440, 442-453, 455-471, 473-480, 482-489, 491, 493-496, 503-531, 533-548, 550-551, 555-567, 569-582, 586-589, 591-600, 640, 663-668, 694
web-app/src/containers/ThreadList.tsx50-53, 57-65, 67-68, 70-84, 86-93, 95-101, 103-108, 110, 113-114, 116-121, 123, 125-134, 136-139, 141-147, 149-154, 156-158, 160-162, 164-169, 171-190, 192-196, 198-202, 204-208, 210-229, 231-233, 235-239, 241-243, 245-250, 252-264, 266-272, 274-279, 281-282, 284-289, 291-301, 303-306, 308-318, 320, 338, 359-364
web-app/src/lib/platform/const.ts6-7, 13, 15-16, 19-20, 23-24, 27-28, 31-32, 35-36, 39, 42-43, 46-47, 50, 53, 56, 59-60, 63-64, 67, 70, 73, 76-77, 80, 83, 86, 89-91
web-app/src/routes/project/$projectId.tsx1-2, 4-6, 8-11, 13-19, 21-23, 25-29, 31, 33-37, 39-40, 43, 46-50, 52-63, 65, 67-72, 74-75, 77-83, 85-97, 99, 102-108, 110-125, 127-130, 132-137, 139-145, 147
web-app/src/routes/project/index.tsx1-2, 4-8, 10-12, 22-24, 26, 28-30, 32-36, 38, 40-53, 55-58, 60-63, 65-69, 71-78, 80-82, 85-91, 93-103, 106-113, 115-126, 128-134, 136-153, 155-156, 158-159, 162-181, 183-189, 191-194, 196-208, 210-232, 234, 236-240, 242-245, 247, 249-255, 257-265, 267-273, 276-278, 280-284, 286, 288-289, 291-306, 308
web-app/src/test/setup.ts48-50, 62-67, 69-72, 74-80, 82-96, 106-112, 132-135, 141-144, 153-156, 158-162

@dinhlongviolin1 dinhlongviolin1 merged commit e462008 into dev Oct 23, 2025
14 of 15 checks passed
@github-project-automation github-project-automation Bot moved this to QA in Jan Oct 23, 2025
@dinhlongviolin1 dinhlongviolin1 deleted the feat/web-models-capabilites branch October 23, 2025 18:31
@github-actions github-actions Bot added this to the v0.7.3 milestone Oct 23, 2025
@Vanalite Vanalite modified the milestones: v0.7.3, v0.7.4 Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

5 participants